-
Notifications
You must be signed in to change notification settings - Fork 48
Sending batches
Andrew Theken edited this page Dec 11, 2014
·
5 revisions
The Postmark batch API allows you to send up to 500 messages at a time:
var message1 = new PostmarkMessage();`
message1.To = "[email protected]";
message1.Cc = "[email protected]";
message1.Subject = "Message 1";
message1.TextBody = "Some plain text";
message1.From = "[email protected]";
var message2 = new PostmarkMessage();`
message2.To = "[email protected]";
message2.Cc = "[email protected]";
message2.Subject = "Message 2";
message2.TextBody = "Some plain text";
message2.From = "[email protected]";
PostmarkMessage[] messageList = new PostmarkMessage[] {message1, message2};
var newClient = new PostmarkClient("server_token");
var responses = newClient.SendMessages(messageList);
A PostmarkResponse
is returned for each message in a list:
foreach (var postmarkResponse in responses)
{
Console.WriteLine("Response was: {0}", postmarkResponse.Message);
}
The Postmark.Net client can be installed from NuGet.
For additional information about the capabilities of the Postmark API, see http://developer.postmarkapp.com/.
- Getting Started
- Version 2.0 Upgrade Guide
- Sending Email
- Searching Sent Messages
- Analyzing Sent Messages
- Processing Inbound Email
- Retrieving Message Statistics
- Handling Bounces
- Managing Suppressions
- Working with Message Streams
- Managing Your Account
- Troubleshooting Async&Await
- Version 1.x Overview
- Sending Email
- Sending Batch Emails
- Sending Attachments
- Sending Inline Images
- Using
MailMessage
- Using the Bounce API
- [Getting Send Statistics](Sending Statistics)
- Adding Custom Email Headers