Hi, is there something that I need to have setup to send email from a .aspx page using .net 2.0? I set up web.config as such:
<system.net>
<mailSettings>
<smtp>
<network
host="mail.domain.com"
port="25"
userName="[email protected]"
password="pswd" />
</smtp>
</mailSettings>
</system.net>
And I have the following in my code behind class:
Dim message As New MailMessage("myemail", theiremail)
message.Subject = "subject"
message.Priority = MailPriority.High
message.Body = Body
message.IsBodyHtml = False
Dim MailClient As New SmtpClient
MailClient.Send(message)
message.Dispose()
This is on a button click event and when I test I get nothing. Can any one help? Thx
<system.net>
<mailSettings>
<smtp>
<network
host="mail.domain.com"
port="25"
userName="[email protected]"
password="pswd" />
</smtp>
</mailSettings>
</system.net>
And I have the following in my code behind class:
Dim message As New MailMessage("myemail", theiremail)
message.Subject = "subject"
message.Priority = MailPriority.High
message.Body = Body
message.IsBodyHtml = False
Dim MailClient As New SmtpClient
MailClient.Send(message)
message.Dispose()
This is on a button click event and when I test I get nothing. Can any one help? Thx