lucee.Component
cbmailservices.models.AbstractProtocol
models.protocols.InMemoryProtocol
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com ---- This protocol stores the mail in the `mail` property file.
| Property Summary | ||||
|---|---|---|---|---|
| type | property | default | serializable | required |
array
|
mail
This is the mail log for all sent mail.
|
true
|
false
|
|
| Constructor Summary | |
|---|---|
|
init([struct properties='[runtime expression]'])
Initialize the InMemory protocol. |
|
| Method Summary | |
|---|---|
string
|
getMail()
|
boolean
|
hasMessage(function callback)
Check if a given message has been sent by passing in a callback. |
InMemoryProtocol
|
reset()
Resets the in-memory array. |
struct
|
send(cbmailservices.models.Mail<cbmailservices.models.Mail> payload)
Store them locally in our maillog property. |
any
|
setMail(array mail)
|
| 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| Property Detail |
|---|
This is the mail log for all sent mail
access - publicrequired - falsereturntype - anyserializable - true| Method Detail |
|---|
Check if a given message has been sent by passing in a callback. Each message will be checked against the callback. If one message passes the callback, this method will return true.
callback - A callback function to check against each mail item.Resets the in-memory array.
Store them locally in our maillog property 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 withmail