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

Why SMTP Email does not work with HTML body attached ?

I am developing an ASP.net application and using SMTP email service with GoDaddy. I followed the following link to set up the basic email and worked as expected.

 

https://www.godaddy.com/help/send-email-using-systemnetmail-19291.

However, when I attach the HTML body to it, do not get any emails.  

 

This is the code I used.

 

string EmailLoginName = "MyEmail@gmail.com";
MailMessage mailMsg = new MailMessage();
mailMsg.From = new MailAddress(EmailLoginName);
mailMsg.To.Add(new MailAddress("RecepientEmail@gmail.com"));
mailMsg.Subject = "Testing godaddy email";

 

string htmlBody = oEmail.MailBodyDescription;

mailMsg.IsBodyHtml = true;
mailMsg.Body = htmlBody;

 

SmtpClient client = new SmtpClient();
client.Send(mailMsg);

 

Any help is appreciated.

1 REPLY 1
Community Manager
Community Manager

Re: Why SMTP Email does not work with HTML body attached ?

Hey @pubuducg. Check out this post for suggestions on things you can do in this situation. Hope that helps. 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.