AutoCalendar Property


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

Data Type: Long

Value Meaning
0 Attaches ics file as normal file attachment.
1 (Default) Generates text/calendar body with ics attachment automatically.

Remarks

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

Examples

[VB] To get the full samples of EASendMail, please refer to Samples section.

[VB6, VBA - Send Email with Calendar]  
Private Sub SendEmail()
  Dim oSmtp As EASendMailObjLib.Mail
  Set oSmtp = New EASendMailObjLib.Mail

  oSmtp.LicenseCode = "TryIt"
  oSmtp.AutoCalendar = 1
  oSmtp.BodyText = "This is a calendar invitation"
  oSmtp.AddAttachment "d:\invite.ics"

  MsgBox oSmtp.GetEmailContent()
 
End Sub

//Output
/*
Message-ID: <6df24faceb69c51460c17fa0001bee3f@>
From: <>
Subject:
Date: Tue, 07 Feb 2012 16:10:50 +0800
MIME-Version: 1.0
Content-Type: multipart/mixed;
        boundary="19e870f174a01887d5803516000f18e1"

This is a multi-part message in MIME format.

--19e870f174a01887d5803516000f18e1
Content-Type: multipart/alternative;
        boundary="19e870f174a01887d5803516000f18e0"


--19e870f174a01887d5803516000f18e0
Content-Type: text/plain;
        charset="utf-8"
Content-Transfer-Encoding: quoted-printable

This is a calendar invitation

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

[encoded calendar part]
--19e870f174a01887d5803516000f18e0--

--19e870f174a01887d5803516000f18e1
Content-Type: text/calendar;
        name="invite.ics"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
        filename="invite.ics"

[encoded calendar attachment]
--19e870f174a01887d5803516000f18e1--

*/

See Also

AddAttachment Method
AddInline Method