Skip to content
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
Merged

[5.2] Register swiftmailer before mailer #12509

merged 1 commit into from Feb 26, 2016

Conversation

@jenssegers
Copy link
Contributor

@jenssegers 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.

Fix CS
@GrahamCampbell GrahamCampbell changed the title Register swiftmailer before mailer [5.2] Register swiftmailer before mailer Feb 26, 2016
taylorotwell added a commit that referenced this pull request Feb 26, 2016
[5.2] Register swiftmailer before mailer
@taylorotwell taylorotwell merged commit 6afc65e into laravel:5.2 Feb 26, 2016
2 checks passed
2 checks passed
StyleCI The StyleCI analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
taylorotwell added a commit that referenced this pull request Feb 27, 2016
[5.1] Same as #12509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants