Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Engage.so laravel headers setup
<?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('mails@ses.engage.so', 'Engage.so');
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment