SmtpMail.AutoCalendar Property

Specifies the e-mail generates text/calendar body with ics attachment automatically. Default is true.

[Visual Basic]
Public Property AutoCalendar As Boolean
public bool AutoCalendar {get; set;}
public: __property bool get_AutoCalendar();
public: __property void set_AutoCalendarbool);
public function get AutoCalendar() : bool;
public function set AutoCalendar(bool);

Property Value

If an ics attachment is attached to the email, seting AutoCalendar to true indicates alternative text/calendar body will be generated automatically. You can use this property to generate and send an email calendar.


[C# - Send Meeting Request]
SmtpMail oMail = new SmtpMail("TryIt");

oMail.AutoCalendar = true;
oMail.TextBody = "This is a calendar invitation";
await oMail.AddAttachmentAsync( "ms-appx:///assets/invite.ics" );

Message-ID: <6df24faceb69c51460c17fa0001bee3f@>
From: <>
Date: Tue, 07 Feb 2012 16:10:50 +0800
MIME-Version: 1.0
Content-Type: multipart/mixed;

This is a multi-part message in MIME format.

Content-Type: multipart/alternative;

Content-Type: text/plain;
Content-Transfer-Encoding: quoted-printable

This is a calendar invitation

Content-Type: text/calendar; charset=utf-8; method=REQUEST
Content-Transfer-Encoding: base64

[encoded calendar part]

Content-Type: text/calendar;
Content-Transfer-Encoding: base64
Content-Disposition: attachment;

[encoded calendar attachment]