How to create an HTML Email Message?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, how would you go about creating an email message with HTML content. This
is what I'm doing ...

OutlookSession Outlook = new OutlookSession();
EmailMessage msg = new EmailMessage();
msg.To.Add(new Recipient("(e-mail address removed)"));
msg.Subject = "My Subject";
msg.BodyText = EmailContent;
msg.Send(Outlook.EmailAccounts[0]);

but of course EmailMessage doesn't have a property to change the header
content type.

Any help much appreciated.

Regards

Sean
 
I overcame this by generating an email using SMTP, rather than going
through the Outlook integration.

I used source I found by Peter Bromberg over at -
http://www.eggheadcafe.com/articles/20030316.asp

It works really well, if you have SMTP connectivity. However
obviously if you are only doing this over wireless ActiveSync your a
little stuck.

Hope this helps.

Richard
 
Thanks for the reply Richard. Unfortunately the requirement is to have the
message sit in the outbox until the next sync. Its a bit frustrating, one
little property...


Richard Jones said:
I overcame this by generating an email using SMTP, rather than going
through the Outlook integration.

I used source I found by Peter Bromberg over at -
http://www.eggheadcafe.com/articles/20030316.asp

It works really well, if you have SMTP connectivity. However
obviously if you are only doing this over wireless ActiveSync your a
little stuck.

Hope this helps.

Richard


Hi, how would you go about creating an email message with HTML content. This
is what I'm doing ...

OutlookSession Outlook = new OutlookSession();
EmailMessage msg = new EmailMessage();
msg.To.Add(new Recipient("(e-mail address removed)"));
msg.Subject = "My Subject";
msg.BodyText = EmailContent;
msg.Send(Outlook.EmailAccounts[0]);

but of course EmailMessage doesn't have a property to change the header
content type.

Any help much appreciated.

Regards

Sean
 
Back
Top