transports/mail/drivers/Postmark.php 1 location
|
@@ 47-57 (lines=11) @@
|
44 |
|
/** |
45 |
|
* {@inheritdoc} |
46 |
|
*/ |
47 |
|
public function send(\Swift_Mime_Message $message, &$failures = null) |
48 |
|
{ |
49 |
|
$this->client->request('POST','https://api.postmarkapp.com/email', [ |
50 |
|
'headers' => [ |
51 |
|
'X-Postmark-Server-Token' => $this->key |
52 |
|
], |
53 |
|
'json' => $this->messageToPayload($message), |
54 |
|
]); |
55 |
|
|
56 |
|
return $this->countRecipients($message); |
57 |
|
} |
58 |
|
|
59 |
|
/** |
60 |
|
* Converts a MIME Message to an array payload in a structure understood by Postmark's "email" endpoint. |
transports/mail/drivers/Sendgrid.php 1 location
|
@@ 49-59 (lines=11) @@
|
46 |
|
/** |
47 |
|
* {@inheritDoc} |
48 |
|
*/ |
49 |
|
public function send(\Swift_Mime_Message $message, &$failures = null) |
50 |
|
{ |
51 |
|
$this->client->request('POST', 'https://api.sendgrid.com/v3/mail/send', [ |
52 |
|
'headers' => [ |
53 |
|
'Authorization' => 'Bearer '.$this->key |
54 |
|
], |
55 |
|
'json' => $this->messageToPayload($message), |
56 |
|
]); |
57 |
|
|
58 |
|
return $this->countRecipients($message); |
59 |
|
} |
60 |
|
|
61 |
|
/** |
62 |
|
* Converts a MIME Message to an array payload in a structure understood by Sendgrid's "mail/send" endpoint. |