Skip to content

Commit 15300a6

Browse files
committed
minor #9824 Add URL-encoding notice (nebkam, javiereguiluz)
This PR was merged into the 4.0 branch. Discussion ---------- Add URL-encoding notice I've had trouble connecting to Amazon SES via recommended method. I kept getting: > Exception occurred while flushing email queue: Failed to authenticate on SMTP server with username "***" I've traced it to "+" sign in the password that Amazon SES automatically assigned to my SMTP credentials. I had a hunch that special characters might be a problem and was thinking along the lines of wrapping the whole MAILER_URL value in single quotes. Then I ran into https://stackoverflow.com/a/50498999/1419874 that solved the issue for me too. Since the OP lost 3hrs and myself almost an hour, I think URL encoding might not be so obvious. Hence I propose this change. I've intentionally put it at the top, since I think it applies to any method that has special characters in username/password, not just Amazon SES. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 7f72a6f Reword 61a69ac Add URL-encoding notice
2 parents fd34933 + 7f72a6f commit 15300a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

email.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ environment variable in the ``.env`` file:
3737
# use this to disable email delivery
3838
MAILER_URL=null://localhost
3939
40-
# use this to configure a traditional SMTP server
40+
# use this to configure a traditional SMTP server (make sure to URL-encode the
41+
# values of the username and password if they contain non-alphanumeric characters
42+
# such as '+', '@', ':' and '*', which are reserved in URLs)
4143
MAILER_URL=smtp://localhost:25?encryption=ssl&auth_mode=login&username=&password=
4244
4345
Refer to the :doc:`SwiftMailer configuration reference </reference/configuration/swiftmailer>`

0 commit comments

Comments
 (0)