I believe that if the email reader does not support the "text/calendar"
type, it is probably converting it to "text/plain". Why email reader are
you using? If you have a web access email account, you might try sending an
email to that account and view it in something like FireFox which supports
"text/calendar".
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
"Vlad" <Vl**@community.nospam> wrote in message
news:ex**************@TK2MSFTNGP04.phx.gbl...
I dont think it has anything to do with HTML/Plain text. Content-type is
email header--not HTTP header. I tried it anyways just to be safe and got
the same results - plain text.
Still need MSFT help with this!
<gu*********@hotmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com... You probably need to set the BodyFormat property on your MailMessage
object to get the content-type to what you want.
Example:
MailMessage mail = new MailMessage();
mail.To = <address>
mail.From = <address>
mail.Subject = emailSubject;
mail.BodyFormat = System.Web.Mail.MailFormat.Html;
Hope that helps
http://www.harleyc.com
Vlad wrote: We are trying to set MailMessage Content-Type to be text/calendar
The following code has been used:
string subject = "Calendar test 3";
MailMessage emailMessage = new MailMessage();
emailMessage.To = <address>
emailMessage.Subject = "my subject";
emailMessage.Headers.Add("Content-Type","text/calendar;method=\"REQUEST\"");
emailMessage.Body=@"BEGIN:VCALENDAR
PRODID:-//ACME/DesktopCalendar//EN
METHOD:REQUEST
VERSION:2.0....<the rest of iCalendar>
";
MailService.Send(emailMessage);
Even though the content-type was specified in Headers collection the
resulting message still contains "text/plain" content-type.
Please help.
Vlad