0 down vote favorite

I am trying send Newsletter with images, I am able to send email but not getting images, I tried to search lots of solution but its not working.Please check this link for Simple Newsletter

When I am trying to email this newsletter, I am getting newsletter without images. I put hard coded images in html file, like <img src=http://www.abc.com/images/xyz.jpg /> Here my simple code for sending email :

MailMessage myMail;

using (StreamReader reader = File.OpenText(Server.MapPath("Newsletter.html"))) // Path to your 
{                                                         // HTML file
    myMail = new MailMessage();
    myMail.From = new MailAddress("email@domain.com.au");
    myMail.Subject = "Test News Letter";
    myMail.To.Add("se@yahoo.com.au");
    myMail.IsBodyHtml = true;

    myMail.Body = reader.ReadToEnd();  // Load the content from your file...

}
SmtpClient smtp = new SmtpClient("xx.xx.xx.y", 25);
smtp.UseDefaultCredentials = true;

NetworkCredential cred = new NetworkCredential("email@domain.com.au", "hakoo");
smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
smtp.Credentials = cred;
smtp.Send(myMail);

Can anyone help me to solve this issues?

Thanks,

Hakoo Desai.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.