SMTP Provider C# Code:
MailMessage Mail;
Mail.Attachments.Clear();
Byte[] bytes = System.Text.Encoding.ASCII.GetBytes(strICSData);
var ms = new MemoryStream(bytes);
var a = new Attachment(ms, "meeting111.ics", "text/calendar");
a.ContentDisposition.Inline = true;
Mail.Attachments.Add(a);
Here
a.ContentDisposition.Inline
Gets or sets a System.Boolean value that determines the disposition type (Inline or Attachment) for an e-mail attachment.
Above code is working fine and mapping my meeting to outlook calendar as shown below.
Find smtp screen shot after sending mail :
Postmark Provider C# Code:
I am also using postmark provider for mail but i did not find any a.ContentDisposition.Inline = true;
functionality.
Please find the below Postmark code :
PostmarkMessage message;
message.Attachments.Clear();
byte[] bytes = System.Text.Encoding.ASCII.GetBytes(strICSData);
var ms = new MemoryStream(bytes);
message.AddAttachment(ms, "meeting111.ics", "text/calendar");
Below line, Adds a file stream with inline support:
message.AddAttachment(ms, "meeting.ics", "text/calendar");
Can anybody provide me solution so that postmark attachment is going to map to outlook calendar.