cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

SMTP Not Sending, error not thrown

I'm using the following code


const string SERVER = "relay-hosting.secureserver.net";
System.Web.Mail.MailMessage oMail = new System.Web.Mail.MailMessage();
oMail.From = "admin@flex.am";
oMail.To = "mmsoftwaresolutionsuk@gmail.com";
oMail.Subject = "New Online Form Message";
oMail.BodyFormat = MailFormat.Html; // enumeration
oMail.Priority = MailPriority.High; // enumeration
oMail.Body = body;
SmtpMail.SmtpServer = SERVER;
SmtpMail.Send(oMail);
oMail = null; // free up resources

 Its not throwing an error, its sending the email through to the smtp server but the message isnt sent to the address.

The body contains html 

1 REPLY 1
Employee
Employee

Re: SMTP Not Sending, error not thrown

Hello @GiveMeAUsername!

 

Thank you for posting. Which type of hosting are you sending mail from? The relay server can be different depending on the type of hosting you're using

 

Heather - GoDaddy | Community Moderator
24/7 support available at x.co/247support