C# Class PostmarkDotNet.PostmarkAdminClient

Postmark Client that supports access to the Administrative APIs, to send email, use the PostmarkClient, instead.
Make sure to include "using PostmarkDotNet;" in your class file, which will include extension methods on the base client.
Inheritance: PostmarkDotNet.PCL.PostmarkClientBase
显示文件 Open project: wildbit/postmark-dotnet Class Usage Examples

Public Methods

Method Description
CreateServerAsync ( String name, string color = null, bool rawEmailEnabled = null, bool smtpApiActivated = null, string inboundHookUrl = null, string bounceHookUrl = null, string openHookUrl = null, bool postFirstOpenOnly = null, bool trackOpens = null, string inboundDomain = null, int inboundSpamThreshold = null ) : Task

Create a new Server.

CreateSignatureAsync ( string fromEmail, string name, string replyToEmail = null, string returnPathDomain = null ) : Task

Create a new sender signature. Note that you'll need to verify this by clicking on the verification link sent to the associated email address.

DeleteServerAsync ( int serverId ) : Task

Get a server with the associated serverId.

To protected your account, you must first request access to use this endpont from [email protected]

DeleteSignatureAsync ( int signatureId ) : Task

Delete a sender signature.

EditServerAsync ( int serverId, String name = null, string color = null, bool rawEmailEnabled = null, bool smtpApiActivated = null, string inboundHookUrl = null, string bounceHookUrl = null, string openHookUrl = null, bool postFirstOpenOnly = null, bool trackOpens = null, string inboundDomain = null, int inboundSpamThreshold = null ) : Task

Update a Server.

GetSenderSignatureAsync ( int signatureId ) : Task

Retrieve a sender signature.

GetSenderSignaturesAsync ( int offset, int count = 100 ) : Task

Get a specific sender signature.

GetServerAsync ( int serverId ) : Task

Get a server with the associated serverId.

GetServersAsync ( int offset, int count = 100, string name = null ) : Task

List all servers that are currently configured for this account.

PostmarkAdminClient ( string accountToken, int requestTimeoutInSeconds = 30, string apiBaseUri = "https://api.postmarkapp.com" ) : PostmarkDotNet.Model

Construct a PostmarkAdminClient.

RequestNewSignatureDKIMAsync ( int signatureId ) : Task

Creates a new DKIM key to be created. Until the DNS entries are confirmed, the new values will be in the DKIMPendingHost and DKIMPendingTextValue fields. After the new DKIM value is verified in DNS, the pending values will migrate to DKIMTextValue and DKIMPendingTextValue and Postmark will begin to sign emails with the new DKIM key.

ResendSignatureVerificationEmailAsync ( int signatureId ) : Task

Cause a new sender signature verification email to be sent to the associated email address.

UpdateSignatureAsync ( int signatureId, string name = null, string replyToEmail = null, string returnPathDomain = null ) : Task

Modift an existing sender signature.

VerifySignatureSPF ( int signatureId ) : Task

Will query DNS for your domain and attempt to verify the SPF record contains the information for Postmark's servers.

Method Details

CreateServerAsync() public method

Create a new Server.
public CreateServerAsync ( String name, string color = null, bool rawEmailEnabled = null, bool smtpApiActivated = null, string inboundHookUrl = null, string bounceHookUrl = null, string openHookUrl = null, bool postFirstOpenOnly = null, bool trackOpens = null, string inboundDomain = null, int inboundSpamThreshold = null ) : Task
name String
color string
rawEmailEnabled bool
smtpApiActivated bool
inboundHookUrl string
bounceHookUrl string
openHookUrl string
postFirstOpenOnly bool
trackOpens bool
inboundDomain string
inboundSpamThreshold int
return Task

CreateSignatureAsync() public method

Create a new sender signature. Note that you'll need to verify this by clicking on the verification link sent to the associated email address.
public CreateSignatureAsync ( string fromEmail, string name, string replyToEmail = null, string returnPathDomain = null ) : Task
fromEmail string
name string
replyToEmail string
returnPathDomain string
return Task

DeleteServerAsync() public method

Get a server with the associated serverId.
To protected your account, you must first request access to use this endpont from [email protected]
public DeleteServerAsync ( int serverId ) : Task
serverId int
return Task

DeleteSignatureAsync() public method

Delete a sender signature.
public DeleteSignatureAsync ( int signatureId ) : Task
signatureId int
return Task

EditServerAsync() public method

Update a Server.
public EditServerAsync ( int serverId, String name = null, string color = null, bool rawEmailEnabled = null, bool smtpApiActivated = null, string inboundHookUrl = null, string bounceHookUrl = null, string openHookUrl = null, bool postFirstOpenOnly = null, bool trackOpens = null, string inboundDomain = null, int inboundSpamThreshold = null ) : Task
serverId int
name String
color string
rawEmailEnabled bool
smtpApiActivated bool
inboundHookUrl string
bounceHookUrl string
openHookUrl string
postFirstOpenOnly bool
trackOpens bool
inboundDomain string
inboundSpamThreshold int
return Task

GetSenderSignatureAsync() public method

Retrieve a sender signature.
public GetSenderSignatureAsync ( int signatureId ) : Task
signatureId int
return Task

GetSenderSignaturesAsync() public method

Get a specific sender signature.
public GetSenderSignaturesAsync ( int offset, int count = 100 ) : Task
offset int
count int
return Task

GetServerAsync() public method

Get a server with the associated serverId.
public GetServerAsync ( int serverId ) : Task
serverId int
return Task

GetServersAsync() public method

List all servers that are currently configured for this account.
public GetServersAsync ( int offset, int count = 100, string name = null ) : Task
offset int
count int
name string
return Task

PostmarkAdminClient() public method

Construct a PostmarkAdminClient.
public PostmarkAdminClient ( string accountToken, int requestTimeoutInSeconds = 30, string apiBaseUri = "https://api.postmarkapp.com" ) : PostmarkDotNet.Model
accountToken string The "accountToken" can be found by logging into your Postmark and navigating to https://postmarkapp.com/account/edit - Keep this token secret and safe.
requestTimeoutInSeconds int The number of seconds to wait for the API to return before throwing a timeout exception.
apiBaseUri string Optionally override the base url to the API. For example, you may fallback to HTTP (non-SSL) if your app requires it, though, this is not recommended.
return PostmarkDotNet.Model

RequestNewSignatureDKIMAsync() public method

Creates a new DKIM key to be created. Until the DNS entries are confirmed, the new values will be in the DKIMPendingHost and DKIMPendingTextValue fields. After the new DKIM value is verified in DNS, the pending values will migrate to DKIMTextValue and DKIMPendingTextValue and Postmark will begin to sign emails with the new DKIM key.
public RequestNewSignatureDKIMAsync ( int signatureId ) : Task
signatureId int
return Task

ResendSignatureVerificationEmailAsync() public method

Cause a new sender signature verification email to be sent to the associated email address.
public ResendSignatureVerificationEmailAsync ( int signatureId ) : Task
signatureId int
return Task

UpdateSignatureAsync() public method

Modift an existing sender signature.
public UpdateSignatureAsync ( int signatureId, string name = null, string replyToEmail = null, string returnPathDomain = null ) : Task
signatureId int
name string
replyToEmail string
returnPathDomain string
return Task

VerifySignatureSPF() public method

Will query DNS for your domain and attempt to verify the SPF record contains the information for Postmark's servers.
public VerifySignatureSPF ( int signatureId ) : Task
signatureId int
return Task