Skip to content

Instantly share code, notes, and snippets.

@Kendysond
Created October 12, 2020 11:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kendysond/71da76a695c8b4ff3b260cf99be0c2b0 to your computer and use it in GitHub Desktop.
Save Kendysond/71da76a695c8b4ff3b260cf99be0c2b0 to your computer and use it in GitHub Desktop.
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