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

Unable to send mail via SMTP due to sender address not matching user #563

Closed
SupraJames opened this issue Sep 10, 2024 · 3 comments
Closed

Comments

@SupraJames
Copy link

Describe the issue
Unable to send mail via SMTP due to sender address not matching user

Deployment has gone well, love the forms but can't get emails to be delivered. Looking in the logs it seems that my hosting provider doesn't like the "+" notation that OpnForm is using.

opnform-api-worker-1 | [2024-09-10 10:45:56] local.ERROR: Expected response code "250" but got code "550", with message "550 5.7.1 [M12] User [noreply@domain] not authorized to send on behalf of <noreply+1725965155@domain> (369aafe9-6f61-11ef-bd51-4d7e77a32f34)". {"exception":"[object] (Symfony\\Component\\Mailer\\Exception\\UnexpectedResponseException(code: 550): Expected response code \"250\" but got code \"550\", with message \"550 5.7.1 [M12] User [noreply@domain] not authorized to send on behalf of <noreply+1725965155@domain> (369aafe9-6f61-11ef-bd51-4d7e77a32f34)\". at /usr/share/nginx/html/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php:333)

Relevant env:

MAIL_MAILER=smtp
MAIL_HOST=smtpserver
MAIL_PORT=465
MAIL_USERNAME=noreply@domain
MAIL_PASSWORD=password
MAIL_ENCRYPTION=TLS
MAIL_FROM_ADDRESS=noreply@domain
MAIL_FROM_NAME="Me me me"

As you can see I am not using this "+" notation anywhere, so I am unsure where this noreply+1725965155@domain address is coming from. Is there a way that is can just use noreply@domain ?

Deployment Environment

docker-compose

Any help would be appreciated!

@JhumanJ
Copy link
Owner

JhumanJ commented Sep 10, 2024

The + that's being added is used to avoid OpnForm notifications to all be put in the same mail thread by mail clients. We could add an option to disable this behavior later but currently there isn't one unfortunately

@SupraJames
Copy link
Author

Thanks for the definitive response! I will try using a different SMTP provider for now.

@JhumanJ
Copy link
Owner

JhumanJ commented Sep 17, 2024

Done in #573

@JhumanJ JhumanJ closed this as completed Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants