lucee.Component
cbmailservices.models.AbstractProtocol
models.protocols.PostmarkProtocol
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com ---- This protocol sends the mails via the Postmark API. The required properties are: - apike : The postmark api key
| Constructor Summary | |
|---|---|
|
init([struct properties='[runtime expression]'])
Initialize the InMemory protocol. |
|
| Method Summary | |
|---|---|
private struct
|
encodeAttachment(struct mailParam)
Encode an attachment like PostMark likes it. |
private any
|
getFileMimeType(any filePath)
Get the file mime type from the filepath. |
struct
|
send(cbmailservices.models.Mail<cbmailservices.models.Mail> payload)
Send it to postmark. |
private any
|
sendToPostmark(any jsonPayload)
Send a json payload to postmark. |
| Methods inherited from class cbmailservices.models.AbstractProtocol |
|---|
| getLog, getName, getProperties, getProperty, propertyExists, setLog, setName, setProperties, setProperty |
| Methods inherited from class lucee.Component |
|---|
| None |
| Constructor Detail |
|---|
Initialize the InMemory protocol
properties - A map of configuration properties for the protocol| Method Detail |
|---|
Encode an attachment like PostMark likes it
mailParam - The structure representing the mail parametersGet the file mime type from the filepath
filePath - The target file pathSend it to postmark The return is a struct with two keys - `error` - A boolean flag if the message was sent or not - `messages` - An array of error messages the protocol stored if any
send
in class
cbmailservices.models.AbstractProtocol
payload - The paylod object to send the message withSend a json payload to postmark
jsonPayload - The json payload to send