Skip to content

Sending Attachments

Andrew Theken edited this page Dec 11, 2014 · 4 revisions

You may add file attachments to any outgoing email provided they comply with the current white-list of accepted email attachments.

var message = new PostmarkMessage();

message.To = "[email protected]";
message.Cc = "[email protected]";
message.Subject = "Sending an attachment";
message.Textbody = "Some plain text";
message.From = "[email protected]";

message.AddAttachment(@"c:\temp\test.pdf", "application/pdf");

var newClient = new PostmarkClient("server_token");

var response = newClient.SendMessageAsync(message);

You may add as many attachments as you like as long as you don't go past the total size limit of 10MB.

Clone this wiki locally