G
Guest
I need help please!
I write a method to send email and there is a button on a web page, click
the button will call the method. everything seems ok. but the email never be
sent.
--------------------
button click: SendMail("(e-mail address removed)")
Public Function SendMail(ByVal toAddr As String) As Boolean
Dim myMessage As New MailMessage
myMessage.To = toAddr
myMessage.From = "(e-mail address removed)"
myMessage.Subject = "Vaughan GIS System"
myMessage.BodyFormat = MailFormat.Text
myMessage.Body = "www.vaughangis.info"
Mail.SmtpMail.SmtpServer = "10.141.140.69"
Try
SmtpMail.Send(myMessage)
Catch ex As Exception
ErrMsg = ex.Message
Return False
End Try
Return True
End Function
---------------
I write a method to send email and there is a button on a web page, click
the button will call the method. everything seems ok. but the email never be
sent.
--------------------
button click: SendMail("(e-mail address removed)")
Public Function SendMail(ByVal toAddr As String) As Boolean
Dim myMessage As New MailMessage
myMessage.To = toAddr
myMessage.From = "(e-mail address removed)"
myMessage.Subject = "Vaughan GIS System"
myMessage.BodyFormat = MailFormat.Text
myMessage.Body = "www.vaughangis.info"
Mail.SmtpMail.SmtpServer = "10.141.140.69"
Try
SmtpMail.Send(myMessage)
Catch ex As Exception
ErrMsg = ex.Message
Return False
End Try
Return True
End Function
---------------