Skip to content

Commit

Permalink
ability to set message ID right hand side using a config value
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid committed Feb 15, 2018
1 parent 9389834 commit 02e7537
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Illuminate/Mail/MailServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Swift_Mailer;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Swift_DependencyContainer;
use Illuminate\Support\ServiceProvider;

class MailServiceProvider extends ServiceProvider
Expand Down Expand Up @@ -88,6 +89,10 @@ public function registerSwiftMailer()
{
$this->registerSwiftTransport();

Swift_DependencyContainer::getInstance()
->register('mime.idgenerator.idright')
->asValue($this->app->make('config')->get('mail.domain', 'swift.generated'));

// Once we have the transporter registered, we will register the actual Swift
// mailer instance, passing in the transport instances, which allows us to
// override this transporter instances during app start-up if necessary.
Expand Down

0 comments on commit 02e7537

Please sign in to comment.