Dear Vincent,
I am writing to send you another demo for sending out meeting request, please check it out.
static void Main(string[] args)
{
MailMessage msg = new MailMessage();
msg.From = "sender@domain.com"; //set the sender
//set the receiptant, who will receive the meeting request.
//basically, the receiptant is the same as meeting attendees
msg.To = "person1@domain.com, person2@domain.com, person3@domain.com";
//create calendar object
Calendar cal = new Calendar(
"Room 112", //location
new DateTime(2006, 12, 24, 13, 0, 0), //start time
new DateTime(2006, 12, 24, 14, 0, 0), //end time
msg.From ,//organizer
msg.To //attendee
);
cal.Summary = "Release Meetting";
cal.Description = "Discuss for the next release";
//add calendar to the message
msg.AddCalendar(cal);
try
{
//create smtp client
SmtpClient client = new SmtpClient("smtp.domain.com", 25, "user", "password");
//bulk send the message
client.Send(msg);
}
catch (MailException ex)
{
System.Diagnostics.Debug.WriteLine(ex.ToString());
}
catch (SmtpException ex)
{
System.Diagnostics.Debug.WriteLine(ex.ToString());
}
}