Skip to content

Commit

Permalink
Check for given message stream id and add to header if given (#35755)
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph Rumpel <c.rumpel@kabsi.at>
  • Loading branch information
christophrumpel and Christoph Rumpel committed Dec 29, 2020
1 parent d44ed21 commit 60c3c81
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Illuminate/Mail/MailManager.php
Expand Up @@ -327,8 +327,13 @@ protected function createMailgunTransport(array $config)
*/
protected function createPostmarkTransport(array $config)
{
$headers = isset($config['message_stream_id']) ? [
'X-PM-Message-Stream' => $config['message_stream_id'],
] : [];

return tap(new PostmarkTransport(
$config['token'] ?? $this->app['config']->get('services.postmark.token')
$config['token'] ?? $this->app['config']->get('services.postmark.token'),
$headers
), function ($transport) {
$transport->registerPlugin(new ThrowExceptionOnFailurePlugin());
});
Expand Down

0 comments on commit 60c3c81

Please sign in to comment.