S
shapper
Hello,
I am sending an HTML newsletter to various subscribers.
I created two alternate views: Text/Html and Text/Plain
In Outlook the email looks fine but in GMail I don't get the Html
version.
If I remove the Text/Plain version then the Html version is displayed.
Any idea why?
Should I only send a HTML version?
My code is as follows:
AlternateView html =
AlternateView.CreateAlternateViewFromString(htmlContent.ToString(),
null, "text/html");
html.TransferEncoding = TransferEncoding.QuotedPrintable;
AlternateView text =
AlternateView.CreateAlternateViewFromString(textContent.ToString(),
null, "text/plain");
text.TransferEncoding = TransferEncoding.QuotedPrintable;
try {
foreach (Subscriber s in subscribers) {
MailMessage mail = new MailMessage();
mail.AlternateViews.Add(html);
mail.AlternateViews.Add(text); // Disables Html Version in
GMail
mail.From = _mails["NoReply"];
mail.Priority = MailPriority.Normal;,
mail.Subject = newsletter.Name;
mail.To.Add(new MailAddress(s.Email, s.Name));
Am I doing something wrong?
Thank You,
Miguel
I am sending an HTML newsletter to various subscribers.
I created two alternate views: Text/Html and Text/Plain
In Outlook the email looks fine but in GMail I don't get the Html
version.
If I remove the Text/Plain version then the Html version is displayed.
Any idea why?
Should I only send a HTML version?
My code is as follows:
AlternateView html =
AlternateView.CreateAlternateViewFromString(htmlContent.ToString(),
null, "text/html");
html.TransferEncoding = TransferEncoding.QuotedPrintable;
AlternateView text =
AlternateView.CreateAlternateViewFromString(textContent.ToString(),
null, "text/plain");
text.TransferEncoding = TransferEncoding.QuotedPrintable;
try {
foreach (Subscriber s in subscribers) {
MailMessage mail = new MailMessage();
mail.AlternateViews.Add(html);
mail.AlternateViews.Add(text); // Disables Html Version in
GMail
mail.From = _mails["NoReply"];
mail.Priority = MailPriority.Normal;,
mail.Subject = newsletter.Name;
mail.To.Add(new MailAddress(s.Email, s.Name));
Am I doing something wrong?
Thank You,
Miguel