public class PostmarkClient extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
API_ENDPOINT |
| Constructor and Description |
|---|
PostmarkClient(String serverToken)
Initializes a new instance of the PostmarkClient class.
|
PostmarkClient(String serverToken,
String serverPath)
Initializes a new instance of the PostmarkClient class.
|
| Modifier and Type | Method and Description |
|---|---|
PostmarkResponse |
sendMessage(PostmarkMessage message)
Sends a message through the Postmark API.
|
PostmarkResponse |
sendMessage(PostmarkTemplate templateMessage)
Sends a template message through the Postmark API.
|
PostmarkResponse |
sendMessage(String from,
String to,
String replyTo,
String cc,
String subject,
String body,
boolean isHTML,
String tag)
Sends a message through the Postmark API.
|
PostmarkResponse |
sendMessage(String from,
String to,
String replyTo,
String cc,
String subject,
String body,
boolean isHTML,
String tag,
List<NameValuePair> headers)
Sends a message through the Postmark API.
|
PostmarkResponse |
sendMessage(String from,
String to,
String replyTo,
String cc,
String bcc,
String subject,
String body,
boolean isHTML,
String tag,
List<NameValuePair> headers)
Sends a message through the Postmark API.
|
public static final String API_ENDPOINT
public PostmarkClient(String serverToken)
serverToken - the postmark server tokenpublic PostmarkClient(String serverToken, String serverPath)
serverToken - the postmark server tokenserverPath - an alternative server path e.g https://api.postmarkapp.compublic PostmarkResponse sendMessage(String from, String to, String replyTo, String cc, String subject, String body, boolean isHTML, String tag) throws PostmarkException
from - An email address for a senderto - An email address for a recipientreplyTo - An email address for the reply-tocc - An email address for CCsubject - The message subject linebody - The message bodyisHTML - Is the body text HTMLtag - A tag to identify the message in postmarkPostmarkResponse with details about the transactionPostmarkException - when something goes wrongpublic PostmarkResponse sendMessage(String from, String to, String replyTo, String cc, String subject, String body, boolean isHTML, String tag, List<NameValuePair> headers) throws PostmarkException
from - An email address for a senderto - An email address for a recipientreplyTo - An email address for the reply-tocc - An email address for CCsubject - The message subject linebody - The message bodyisHTML - Is the body text HTMLtag - A tag to identify the message in postmarkheaders - A collection of additional mail headers to send with the messagePostmarkResponse with details about the transactionPostmarkException - when something goes wrongpublic PostmarkResponse sendMessage(String from, String to, String replyTo, String cc, String bcc, String subject, String body, boolean isHTML, String tag, List<NameValuePair> headers) throws PostmarkException
from - An email address for a senderto - An email address for a recipientreplyTo - An email address for the reply-tocc - An email address for CCbcc - An email address for BCCsubject - The message subject linebody - The message bodyisHTML - Is the body text HTMLtag - A tag to identify the message in postmarkheaders - A collection of additional mail headers to send with the messagePostmarkResponse with details about the transactionPostmarkException - when something goes wrongpublic PostmarkResponse sendMessage(PostmarkTemplate templateMessage) throws PostmarkException
templateMessage - A prepared template message instance.PostmarkException - when something goes wrongpublic PostmarkResponse sendMessage(PostmarkMessage message) throws PostmarkException
message - A prepared message instance.PostmarkException - when something goes wrongCopyright © 2017. All rights reserved.