Skip to content

Move to the new DSN format for Mailer #12258

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

Merged
merged 1 commit into from
Sep 16, 2019
Merged

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Sep 2, 2019

fabpot added a commit to symfony/symfony that referenced this pull request Sep 2, 2019
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Change the DSN semantics

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | symfony/symfony-docs#12258

I'm not very satisfied with the current DSNs for the Mailer. First, the scheme/protocol should use the provider name, then, there is no way to change the host, which would be nice to debug more easily (using a requestb.in service for instance).

Before:

```
smtp://USERNAME:PASSWORD@mailgun
http://KEY:DOMAIN@mailgun
```

After:

```
mailgun+smtp://USERNAME:PASSWORD@default
mailgun+http://KEY:DOMAIN@default

# New
mailgun+http://KEY:DOMAIN@somewhere.com:99
```

SMTP DSNs did not change, but the special sendmail one did:

Before:

```
smtp://sendmail
```

After:

```
sendmail+smtp://default
```

And for the `null` transport:

Before:

```
smtp://null
```

After:

```
null://null
```

Commits
-------

469c989 [Mailer] Change the DSN semantics
@javiereguiluz
Copy link
Member

Thanks Fabien.

@javiereguiluz javiereguiluz merged commit c9febee into symfony:master Sep 16, 2019
javiereguiluz added a commit that referenced this pull request Oct 16, 2019
…uz, tucksaun)

This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Move to the new DSN format

Documents symfony/symfony#33424

Cherry-picking #12258 that should have target 4.4 and also add a missing DSN update.

Commits
-------

a2c607b [Mailer] Move remaining DSN to new format
ca56502 Minor tweaks
be392bc Move to the new DSN format for Mailer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants