Here I will explain it in detail, how we can construct the ICS file and send as an attachment in the email.
First create a method
public void SendmailWithIcsAttachment()
{
//Now we have
to set the value to Mail message properties. As shown below.
//Note Please change it to correct mail-id to use
this in your application
msg.From = new MailAddress("xxxxx@xyz.com", "ABC");
msg.To.Add(new MailAddress("yyyyy@xyz.com", "BCD"));
msg.CC.Add(new MailAddress("zzzzz@xyz.com", "DEF"));// it is optional,
only if required
msg.Subject
= "Send mail with ICS file as an Attachment";
msg.Body = "Please Attend the meeting with this schedule";
msg.Subject = "Send
mail with ICS file as an Attachment";
msg.Body
= "Please Attend the meeting with this
schedule";
Now will see the Sending mail part
}
Happy Coding!!!