I have an application that sends an HTML letter with embedded images. Email is ideal for many different desktop / web clients. When an email is viewed on a mobile phone that supports HTML email (tested on iPhone, WinMo 6.1), the images appear as red “X”. All other HTML is displayed correctly. To be clear, the problem ONLY occurs on mobile clients, not desktop clients.
The code for embedding images works fine, and I do not believe that there are any problems with it, but just in case, I included some simple code examples:
MailMessage mail = new MailMessage();
mail.To.Add("123@myemail.com");
mail.From = new MailAddress("456@ myemail.com");
mail.Subject = "Image sample - fails in mobile clients";
string Body = "Sample email text<img src=\"cid:imageId\" />";
AlternateView htmlView = AlternateView.CreateAlternateViewFromString(Body, null, "text/html");
LinkedResource lr = new LinkedResource("myImage.jpg");
lr.ContentId = "imageId";
htmlView.LinkedResources.Add(lr);
mail.AlternateViews.Add(htmlView);
SmtpClient smtpClient = new SmtpClient();
smtpClient.Send(mail);
- , ? , ?
: Outlook 2007 ( ) , . HTML- , , .
Outlook , - ( ) . ?