I have an Email that I want to send with C #, which has vCalendar and HTML body parts.
I created MailMessage and defined 2 alternative views:
AlternateView avCal = new AlternateView("VCALENDAR:...", null, "text/calendar"); AlternateView avHtml = new AlternateView("<p>some html</p>", null, "text/html"); mailMessage.AlternateViews.Add(avCal); mailMessage.AlternateViews.Add(avHtml);
This gives me a message with Content-Type from multipart/alternative .
This will show both the appointment of the calendar and part of the HTML on my webmail, but not Outlook.
How can I show two different parts, such as different types of content? What I'm looking for is more like Content-Type: multipart/mixed , where both alternate views are displayed.
EDIT
When I use the @Chris Haas method, I get closer, but the markup is not displayed. It seems to be ignoring MailMessage.IsBodyHtml = true

not quite sure how to view it in Outlook, but only the headers ...
Return-Path: <*****@****.com> X-Footer: ZWJyaWRnZS5jb20= Received: from localhost ([127.0.0.1]) by mail.foo.com for *****@****.com; Wed, 2 Jan 2013 17:20:14 -0500 MIME-Version: 1.0 From: "George Washington" <*****@****.com> To: "George Washington" <*****@****.com> Date: 2 Jan 2013 17:29:14 -0500 Subject: To-Do: test test - test Content-Type: multipart/mixed; boundary=--boundary_0_4fbc08b4-2198-45b1-bf2e-9659179aad84
source share