-
Notifications
You must be signed in to change notification settings - Fork 45
Retrieving Message Statistics
Andrew Theken edited this page Dec 12, 2014
·
3 revisions
The Postmark API allows you to gain powerful insights into the deliverability and effectiveness of the email you send. The PostmarkClient
supports retrieving these statistics through the API.
var client = new PostmarkClient("<server token>");
var outboundOverviewStats = await client
.GetOutboundOverviewStatsAsync("tag1",
DateTime.UtcNow - TimeSpan.FromDays(3),
DateTime.UtcNow);
var client = new PostmarkClient("<server token>");
var outboundSentCounts = await client
.GetOutboundSentCountsAsync("tag1",
DateTime.UtcNow - TimeSpan.FromDays(3),
DateTime.UtcNow)
var client = new PostmarkClient("<server token>");
var outboundBounceCounts = await client
.GetOutboundBounceCountsAsync("tag1",
DateTime.UtcNow - TimeSpan.FromDays(3),
DateTime.UtcNow)
var client = new PostmarkClient("<server token>");
var spamComplaints = await client
.GetOutboundSpamComplaintCountsAsync("tag1",
DateTime.UtcNow - TimeSpan.FromDays(3),
DateTime.UtcNow)
var client = new PostmarkClient("<server token>");
var trackingCounts = await client
.GetOutboundTrackingCountsAsync("tag1",
DateTime.UtcNow - TimeSpan.FromDays(3),
DateTime.UtcNow)
var client = new PostmarkClient("<server token>");
var openCounts = await client
.GetOutboundOpenCountsAsync("tag1",
DateTime.UtcNow - TimeSpan.FromDays(3),
DateTime.UtcNow);
var client = new PostmarkClient("<server token>");
var platformUsage = await client
.GetOutboundPlatformCountsAsync("tag1",
DateTime.UtcNow - TimeSpan.FromDays(3),
DateTime.UtcNow);
var client = new PostmarkClient("<server token>");
var mailClientCounts = await client
.GetOutboundClientUsageCountsAsync("tag1",
DateTime.UtcNow - TimeSpan.FromDays(3),
DateTime.UtcNow);
var client = new PostmarkClient("<server token>");
var readTimes = await client
.GetOutboundReadtimeStatsAsync("tag1",
DateTime.UtcNow - TimeSpan.FromDays(3),
DateTime.UtcNow);
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