I've written a program that sends a confirmation email after the user submits. The code points to the email server we have and the emails were sending fine when I was testing the program on my localhost. Now I have moved the application to the web server and it will not send an email. I've tried sending it to several addresses to make sure, but it fails to email every time. Here is my code:
Dim eMail As New MailMessage
eMail.Body = strMessage
eMail.From = "firstname.lastname@example.org"
eMail.Subject = "Approval Needed"
eMail.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "mail.adtrav.com"
eMail.To = "email@example.com"
I am not familiar with the fields.add part, but I have been told that this can be given the email address and password of a valid account and it should work. I have also tried it without those three lines and it still doesn't work. Help! I am giving away all the points I have left and this is very urgent!