Created
October 12, 2020 11:07
-
-
Save Kendysond/71da76a695c8b4ff3b260cf99be0c2b0 to your computer and use it in GitHub Desktop.
Engage.so laravel headers setup
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 | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Mail\Events\MessageSending; | |
use Illuminate\Support\Facades\Event; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Register any application services. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
// | |
} | |
/** | |
* Bootstrap any application services. | |
* | |
* @return void | |
*/ | |
public function boot(UrlGenerator $url) | |
{ | |
Event::listen(MessageSending::class, function (MessageSending $event) { | |
$event->message->getHeaders()->addTextHeader('X-SES-CONFIGURATION-SET', 'engage_so'); | |
$event->message->addBcc('[email protected]', 'Engage.so'); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment