1

我正在尝试发送带有图片的时事通讯,我可以发送电子邮件但没有收到图片,我尝试搜索很多解决方案但它不起作用。请查看此链接以获取简单时事通讯

当我尝试通过电子邮件发送此时事通讯时,我收到的时事通讯没有图片。我把硬编码的图像放在 html 文件中,比如<img src=http://www.abc.com/images/xyz.jpg /> 这里我发送电子邮件的简单代码:

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);

谁能帮我解决这个问题?

谢谢,

哈古德赛。

4

0 回答 0