Skip to content

Commit d2eccda

Browse files
committed
feature #18118 Add note about custom port being ignored by specific mailer transport DSN (dreadnip)
This PR was submitted for the 6.3 branch but it was merged into the 5.4 branch instead. Discussion ---------- Add note about custom port being ignored by specific mailer transport DSN See symfony/symfony#49768 Seems like there has been some confusion about this: * symfony/symfony#46979 * symfony/symfony#44794 People start with the default they're given by the docs, e.g. `sendgrid+smtp` and then try to append `:<port>` to configure it, which doesn't work. As far as I know, the official recommendation is to use the regular `smtp` transport instead when using custom config: symfony/symfony#36224 (comment) Commits ------- b39027f Add note about custom port configuration being ignored by specific mailer transport DSN
2 parents 5930f48 + b39027f commit d2eccda

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mailer.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,17 @@ OhMySMTP ohmysmtp+smtp://API_TOKEN@default n/a
236236
237237
Note that the protocol is *always* HTTPs and cannot be changed.
238238

239+
.. note::
240+
241+
The specific transports, e.g. ``mailgun+smtp`` are designed to work without any manual configuration.
242+
Changing the port by appending it to your DSN is not supported for any of these ``<provider>+smtp` transports.
243+
If you need to change the port, use the ``smtp`` transport instead, like so:
244+
245+
.. code-block:: env
246+
247+
# .env
248+
MAILER_DSN=smtp://KEY:[email protected]:25
249+
239250
High Availability
240251
~~~~~~~~~~~~~~~~~
241252

0 commit comments

Comments
 (0)