Hi, this is the code I use for sending email:
It doesn't throw an error but the message isn't sent.
What am I doing wrong?
Code:
Dim Mail1 As System.Web.Mail.MailMessage
Mail1 = new System.Web.Mail.MailMessage()
Mail1.From = "[email protected]"
Mail1.To = "[email protected]"
Mail1.Subject = "Subject"
Mail1.Body = "Body"
Try
System.Web.Mail.SmtpMail.Send(Mail1)
Catch Exc As Exception
Response.Write(Exc.Message)
End Try
It doesn't throw an error but the message isn't sent.
What am I doing wrong?