symfony / swiftmailer-bundle

Symfony Swiftmailer Bundle
https://symfony.com/swiftmailer-bundle
MIT License
1.56k stars 151 forks source link

Login error if MAILER_URL username or password contains + sign #242

Closed txptr closed 6 years ago

txptr commented 6 years ago

I discovered the following error:

My goal is to send e-mails via the Amazon Simple E-Mail Service (SES) SMTP. I'm using Symfony 4.0.8 with swiftmailer-bundle 3.2.2 (SwiftMailer 6.0.2) and had problems, sending a mail if the username or password, which is generated by Amazon itself, contains a + sign.

The + sign is converted into a blank space while the .ENV variable MAILER_URL is parsed.

I found the problem after I changed the encryption to "xxx" which is obviously not supported. The profiler luckily showed the parsed config values under the InvalidArgumentException.

image

My .env MAILER_URL=smtp://email-smtp.eu-west-1.amazonaws.com:465?encryption=xxx&auth_mode=login&username=TEST+USERNAME&password=12+34+56+78+90+AB+CD+EF+GH+IJ+KL

I hope it's not a usage fault by me!!

txptr commented 6 years ago

Duplicate of #234