Last active
February 1, 2017 19:04
-
-
Save stefro/5aafdf04c98bbc652fe4ada7f1cc0fe9 to your computer and use it in GitHub Desktop.
Laravel Mailable that sends a custom id to reference webhook to Mailgun
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Build the message. | |
* | |
* @return $this | |
*/ | |
public function build() | |
{ | |
return $this->markdown('emails.email-verification') | |
->subject('verify your email address') | |
->withSwiftMessage(function ($message) { | |
$message->getHeaders() | |
->addTextHeader('X-Mailgun-Variables', json_encode([ | |
'type' => 'verification', | |
'id' => 'our_unique_id' | |
])); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment