Re: ASP.NET VB Email form V2
What code are you currently use to send the email?
Re: ASP.NET VB Email form V2
Quote:
Originally Posted by
sapator
What code are you currently use to send the email?
None yet but i configured the web.config file to communicate with my mail server. Have you viewed the source code on my web page?
Re: ASP.NET VB Email form V2
Is there anything that will help us if we view your source code?
You said that you haven't done any coding.
Better Google around a little on how to send mail and then if you have problems sending your mail post your questions.
Ah, also post your web.config section that you fixed for your mail....An while on it post also your login credentials your credit card number and you password on every site you are currently member(i hope you don't do it) :) ....
1 Attachment(s)
Re: ASP.NET VB Email form V2
I've uploaded my email project so if you guys found a solution you may add code but please can you comment the areas on where you have written the code you have provided me?
As mentioned before i need to configure the Email Daora D button.
Re: ASP.NET VB Email form V2
Yes , well i don't think anyone will give you the code, at least on this forum.You have to tell us what you are trying and what code you use.
I also asked for your web config(along with the other) section that you configure your email to see if you have done it right.Let's start from that but personally am going to bed so if no one has answered i'll take a look tomorrow.
Re: ASP.NET VB Email form V2
Quote:
Originally Posted by
sapator
Yes , well i don't think anyone will give you the code, at least on this forum.You have to tell us what you are trying and what code you use.
I also asked for your web config(along with the other) section that you configure your email to see if you have done it right.Let's start from that but personally am going to bed so if no one has answered i'll take a look tomorrow.
have you checked out my web.config file in the app i uploaded?
Re: ASP.NET VB Email form V2
Yes, i would advise not to put your username and password in web.config.You can create a class that will send mails and put your credentials there for safer access or encrypt the web.config but i haven;t tried on the mail namespace.
Now as i've said you have to create a class to send your emails.What have you found and tried googling around and do you have any problems?
P.S. for future reference post your code in the forum.It's tiresome to go back and forth looking at your zip.
Re: ASP.NET VB Email form V2
Quote:
Originally Posted by
sapator
Yes, i would advise not to put your username and password in web.config.You can create a class that will send mails and put your credentials there for safer access or encrypt the web.config but i haven;t tried on the mail namespace.
Now as i've said you have to create a class to send your emails.What have you found and tried googling around and do you have any problems?
P.S. for future reference post your code in the forum.It's tiresome to go back and forth looking at your zip.
Cheers for the advise.......umm in the web config file is it best to comment the details? I appoligise if i did it wrong after i am new here :)
Re: ASP.NET VB Email form V2
Hi everyone i tried this code but i keep getting blue underlines on the Dim mm as New MailMessage and Dim smtp as New smtpclient
Code:
Protected Sub btnEmail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnEmail.Click
'!!! UPDATE THIS VALUE TO YOUR EMAIL ADDRESS
Const ToAddress As String = "[email protected]"
'(1) Create the MailMessage instance
Dim mm As New MailMessage(UsersEmail.Text, ToAddress)
'(2) Assign the MailMessage's properties
mm.Subject = txtSubject.Text
mm.Message = txtName.Text
mm.IsMessageHtml = False
'(3) Create the SmtpClient object
Dim smtp As New Smtp
'(4) Send the MailMessage (will use the Web.config settings)
smtp.Send(mm)
End Sub
thats the code i tried for my email button but when i run it Visual Studio says i have errors.
Re: ASP.NET VB Email form V2
Hi.For once you are probably missing a namespace
"Imports System.Net.Mail"
Now,what do the errors say?
Re: ASP.NET VB Email form V2
Quote:
Originally Posted by
sapator
Hi.For once you are probably missing a namespace
"Imports System.Net.Mail"
Now,what do the errors say?
where does that go in?
Re: ASP.NET VB Email form V2
Re: ASP.NET VB Email form V2
Quote:
Originally Posted by
sapator
top of page.
I inserted it on top but i'm still getting blue under-lines.
is this right?
Code:
Imports System.Net.Mail
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub btnClear_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnClear.Click
Server.Transfer("Default.aspx")
End Sub
Protected Sub btnEmail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnEmail.Click
'!!! UPDATE THIS VALUE TO YOUR EMAIL ADDRESS
Const ToAddress As String = "[email protected]"
'(1) Create the MailMessage instance
Dim mm As New MailMessage (Underline Useremail)--->(UsersEmail.Text, ToAddress)
'(2) Assign the MailMessage's properties
mm.Subject = txtSubject.Text
(Underline)---> mm.Message = txtName.Text
(Underline)---> mm.IsMessageHtml = False
'(3) Create the SmtpClient object
Dim SMTP As New SmtpClient
'(4) Send the MailMessage (will use the Web.config settings)
SMTP.Send(mm)
End Sub
End Class
I've pointed out the errors im getting
Re: ASP.NET VB Email form V2
Hi.It appears that we have a serious problem here if you don't know how to use import.What you have shown here is that you just copy pasted the code and expect us to fix it for you.As i've said you have to study and test first.I also suggest some basic vb.net lessons from an eBook because it appears that you cannot even grasp the basics.
Please first take your time and read the vb.net coding basics and then deal with this page.
I'm talking like JMC here but i'm afraid that even if i fix your code then you will stuck on the very next piece of coding.I prefer not to do that in order to push you to learn rather than copy-paste.I will be happy to answer any questions that shows effort and basic understanding of the language you use.
Cheers.
P.S. You can put your mouse on the blue lines and see what is the error problem.
Re: ASP.NET VB Email form V2
Quote:
Originally Posted by
sapator
Hi.It appears that we have a serious problem here if you don't know how to use import.What you have shown here is that you just copy pasted the code and expect us to fix it for you.As i've said you have to study and test first.I also suggest some basic vb.net lessons from an eBook because it appears that you cannot even grasp the basics.
Please first take your time and read the vb.net coding basics and then deal with this page.
I'm talking like JMC here but i'm afraid that even if i fix your code then you will stuck on the very next piece of coding.I prefer not to do that in order to push you to learn rather than copy-paste.I will be happy to answer any questions that shows effort and basic understanding of the language you use.
Cheers.
P.S. You can put your mouse on the blue lines and see what is the error problem.
I only just started learning ASP.NET in my college, diploma is the next level....but at the same time i'm trying to teach myself how to code my designs.
Re: ASP.NET VB Email form V2
What i've said is that your problem is vb.net , the .net language not asp.net particularly.Design is another thing, you don't need .net for design.
Re: ASP.NET VB Email form V2
Quote:
Originally Posted by
sapator
What i've said is that your problem is vb.net , the .net language not asp.net particularly.Design is another thing, you don't need .net for design.
hmm this is going to take a while for this to sink in hehe