-
Notifications
You must be signed in to change notification settings - Fork 45
Home
jptoto edited this page Feb 9, 2012
·
3 revisions
Welcome to the postmark-dotnet wiki!
Pre-requisites
- You’ll need to go to http://postmarkapp.com and sign up for a new account.
- You’ll need a server token, obtained when you set up a new server on your existing account.
- You’ll need to verify at least one sender signature, which is the email address used for the “From” value (http://postmarkapp.com/signatures)
Getting Started
using PostmarkDotNet;
PostmarkMessage message = new PostmarkMessage { From = “sender@example.com”, To = “receiver@example.com”, Subject = “Test”, HtmlBody = “Hello”, TextBody = “Hello”, ReplyTo = “reply@example.com”, Headers = new NameValueCollection {{"CUSTOM-HEADER", "value"}} };
// Adding attachments // See http://developer.postmarkapp.com/developer-build.html#attachments for allowed extensions. message.AddAttachment(fileName, "Content-Type");
PostmarkClient client = new PostmarkClient(my_server_token);
PostmarkResponse response = client.SendMessage(message);
if(response.Status != PostmarkStatus.Success) { Console.WriteLine("Response was: " + response.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