Question

I am using the implementation provided in the link below to create a ics file as an outlook appointment reminder. It seems to be working fine, but I am not able to specify the name of the file that is attached.

vCalendar Implementation

Any help will be much appreciated. I would like the attachment to be name Appointment Reminder.ics

Thanks!

Was it helpful?

Solution

The implementation you linked shows how to send the calendar entry as an alternative view, not as an attachment. I'm guessing that you also want people to see it as an attachment. In that case you just need to attach a file to the same message:

msg.Attachments.Add(Attachment.CreateAttachmentFromString(
     str.ToString(), "Appointment Reminder.ics"));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top