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

[Mailer] Sometimes we got `Relaying denied`, what should we do? #32987

Closed
Kocal opened this issue Aug 6, 2019 · 6 comments

Comments

@Kocal
Copy link
Contributor

commented Aug 6, 2019

Symfony version(s) affected: 4.3.2

Description
When using the new Mailer component with the Mailgun transport, we have the following issue when sending an email ($mailer->send(...)):

Symfony\Component\Mailer\Exception\TransportException: 
Expected response code "250/251/252" but got code "550", with message "550 5.7.1 Relaying denied".

Our Mailer's url looks like this: smtp://smtp.mailgun.org:587?username=<username>&password=<password>.

Also note that we didn't have any issues when using SwiftMailer.
I will try to update the project to the last version of Symfony and see if it solve our issue.

Thanks

@fabpot

This comment has been minimized.

Copy link
Member

commented Aug 6, 2019

It looks like we are trying to send an email without being authenticated. Probably happens when reusing an SMTP session after some time.

@fabpot

This comment has been minimized.

Copy link
Member

commented Aug 6, 2019

@Kocal Is it a permanent issue or does it happen only randomly?

@Kocal

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

It's a permanent issue.
I will try to use the http://...@mailgun DSN as a temporary workaround.

@fabpot

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

Just notice that your DSN is wrong: smtp://smtp.mailgun.org:587?username=&password= is not valid (that's a Swiftmailer DSN, not a Symfony Mailer one).

@fabpot fabpot closed this Aug 7, 2019

@fabpot

This comment has been minimized.

@Kocal

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

Oh sorry, I didn't think about changing it.

Also thanks for the link, I wasn't able to find anything for helping me here or here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.