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.
Hey @pubuducg. Check out this post for suggestions on things you can do in this situation. Hope that helps.