Here is the format I'm using:
Protected Sub SendEmail_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles SendEmail.Click
'!!! UPDATE THIS VALUE TO YOUR EMAIL ADDRESS
Const ToAddress As String = "y...@youremail.com"
'(1) Create the MailMessage instance
Dim mm As New MailMessage(UsersEmail.Text, ToAddress)
'(2) Assign the MailMessage's properties
mm.Subject = Subject.Text
mm.Body = Body.Text
mm.IsBodyHtml = 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
Thank you in advance.
Hello,
Can someone help me on this problem that I'm having send an email.
I using the two classes MailMessage() ,a dn SMTPClient(). I'm using
"localhost" and port 25 as my SMTP client and port assigment. I don't
recieve any errors. Is there a way I can check if the emails are in a
"que" or something?
Here is the format I'm using:
Protected Sub SendEmail_Click(ByVal sender As Object, ByVal e As
System.EventArgs ) Handles SendEmail.Click