Mailer
class Mailer implements MailerInterface (View source)
Minimal implementation of a MailerInterface
Properties
protected HttpClient | $httpClient | ||
protected string | $serverToken |
Methods
No description
No description
No description
No description
No description
Return a key -> value array of headers
No description
If a Response is not successful it will be passed to this method each Mailer should then throw an HttpException with an optional ApiException to help identify the problem.
Details
at line 40
__construct(HttpClient $httpClient, string $serverToken)
at line 49
setHttpClient(HttpClient $httpClient)
at line 86
setServerToken($serverToken)
at line 98
string
getServerToken()
at line 106
Boolean
send(MessageInterface $message)
at line 126
protected array
getHeaders()
Return a key -> value array of headers
example: array('X-Header-Name' => 'value')
at line 142
protected string[]
getFiles(MessageInterface $message)
Return an key -> value array of files
example: array('attachmentname.jpg' => '/path/to/file.jpg')
at line 150
abstract protected string
getEndpoint()
at line 160
abstract protected string
format(MessageInterface $message)
Return a a string formatted for the correct Mailer endpoint.
Postmark this is Json, SendGrid it is a urlencoded parameter list
at line 172
abstract protected
handle(ResponseInterface $response)
If a Response is not successful it will be passed to this method each Mailer should then throw an HttpException with an optional ApiException to help identify the problem.