-
Notifications
You must be signed in to change notification settings - Fork 48
Processing Inbound Email
Vlad-Cosmin Sandu edited this page Jul 7, 2020
·
5 revisions
The Postmark API provides powerful features to process inbound messages. You can use PostmarkClient
to retrieve these messages.
var client = new PostmarkClient("<server token>");
var matchedInboundMessages = await client
.GetInboundMessagesAsync(0, 100, "[email protected]",
"[email protected]",
"Reply to this message verify your email address.");
var client = new PostmarkClient("<server token>");
var inboundMessageId = "a message id";
var inboundMessage = await client
.GetInboundMessageDetailsAsync(inboundMessageId);
See Inbound Rules for more information.
var client = new PostmarkClient("<server token>");
var inboundMessageId = "a message id";
var bypassResult = await client
.BypassBlockedInboundMessage(inboundMessageId);
See Inbound Webhooks for more information.
You can use the PostmarkInboundWebhookMessage
model to represent the data received via the Inbound Webhook.
// Example implementing an Inbound Webhook endpoint in ASP.NET Web API
[HttpPost]
public async Task<IActionResult> PostInboundWebhook(PostmarkInboundWebhookMessage message)
{
// Process the inbound hook data
return NoContent();
}
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