New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Register swiftmailer before mailer #12509

Merged
merged 1 commit into from Feb 26, 2016

Conversation

Projects
None yet
2 participants
@jenssegers
Contributor

jenssegers commented Feb 26, 2016

This change allows users to extend the swift.transport manager from their own service providers:

    public function register()
    {
        $this->app['swift.transport']->extend('postmark', function () {
            return new PostmarkTransport($this->app['config']->get('services.postmark.token'));
        });
    }

Without this it is not possible to add mail drivers before the mailer is constructed with the current mail driver, because swift.transport is not registered on the container yet.

This applies to all 5.x versions.

@jenssegers jenssegers referenced this pull request Feb 26, 2016

Closed

Simplify service provider #5

@GrahamCampbell GrahamCampbell changed the title from Register swiftmailer before mailer to [5.2] Register swiftmailer before mailer Feb 26, 2016

taylorotwell added a commit that referenced this pull request Feb 26, 2016

Merge pull request #12509 from jenssegers/patch-1
[5.2] Register swiftmailer before mailer

@taylorotwell taylorotwell merged commit 6afc65e into laravel:5.2 Feb 26, 2016

2 checks passed

StyleCI The StyleCI analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jenssegers jenssegers referenced this pull request Feb 27, 2016

Merged

[5.1] Same as #12509 #12518

taylorotwell added a commit that referenced this pull request Feb 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment