-
Notifications
You must be signed in to change notification settings - Fork 48
Managing Your Servers
Andrew Theken edited this page Dec 12, 2014
·
4 revisions
The Postmark API allows you to isolate the email you send into "Servers." You can think of these as "Virtual Mail Servers," all emails that you send or recieve using Postmark are associated with a single Server.
The Postmark API allows you to create, read, update, and delete Servers programatically.
var adminClient = new PostmarkAdminClient("<account token>");
var newServer = await adminClient.CreateServerAsync("Test Server");
var adminClient = new PostmarkAdminClient("<account token>");
var servers = await adminClient.GetServersAsync();
foreach(var server in servers.Servers){
Console.WriteLine(server.Name);
}
var adminClient = new PostmarkAdminClient("<account token>");
var serverId = 42;
var server = await adminClient.GetServerAsync(serverId);
var adminClient = new PostmarkAdminClient("<account token>");
var serverId = 42;
var server = await adminClient.GetServerAsync(serverId);
var updatedServer = await adminClient
.EditServerAsync(42,"Update Test Server Name");
Console.Writeline(updatedServer.Name);
Since this a destructive operation, you must request that this feature be enabled for your account from support: [[email protected]](mailto:[email protected]?subject=Please enable the DELETE Server API for my account.)
var adminClient = new PostmarkAdminClient("<account token>");
var serverId = 42;
var result = await adminClient.DeleteServerAsync(serverId);
if(result.Status == PostmarkStatus.Success){ /* Continue... */}
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