Skip to content

Getting Started

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

Getting started with Postmark is very easy. Let's talk about pre-requisites:

Pre-requisites:

  1. A Postmark Account: Sign up for a new account.
  2. A "Server Token": Set up a new 'server' in your account.
  3. A "Sender Signature": Create a sender signature here.

Sending your first email:

Postmark is designed to make sending email super easy, the following snippet shows how easy it is to get started:

using PostmarkDotNet;

public async Task SendTestMessage(){
	
	var client = new PostmarkClient("<server token>");

	try{
		var sendResult = await client.SendMessageAsync("<sender signature>", 
			"[email protected]", 
			"Hello from Postmark!",
			"This is just a friendly hello from your friends at Postmark.");
	}catch{
		//log/recover	
	}
}

This is the bare-minimum to send an email using the Postmark client, but you can do a great deal more with with the Postmark.Net library. Take special note that you should replace <server token> with the toekn you obtained in item two of the pre-requisites, and replace <sender signature> with the signature you obtained from item three of the pre-requisites above.

Next, check out more advanced sending options on our Sending Email wiki page, and the other topics listed in the sidebar on the right of this wiki.

Clone this wiki locally