you miss this
Port and encryption:
- 587 with STARTTLS (recommended)
- 465 with TLS
- 25 with STARTTLS or none
you must set MAIL_ENCRYPTION (if you use the 587 port) to ssl (or tls if still not working) or use port 25 with MAIL_ENCRYPTION=null
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi guys,
I'm trying to send a mail through a One.com email address, but I get the following error:
Expected response code 220 but got code "521", with message "521 Connection was rejected
↵
I have filled in the following:
MAIL_DRIVER="smtp"
MAIL_HOST="mailout.one.com"
MAIL_PORT=587
MAIL_USERNAME="MAIL ADDRESS"
MAIL_PASSWORD="PASSWORD"
MAIL_ENCRYPTION=null
It works fine when testing with Mailtrap, so nothing wrong with the code.
I'm testing locally, but in production which is hosted on Digital Ocean, I get the same error.
I've tried the the different ports that One.com recommends at https://help.one.com/hc/en-us/articles/115005594345-Can-I-send-mails-from-my-website-.
I haven't contacted their support yet, but hoped that someone here has experienced the same? :)
from https://help.one.com/hc/en-us/articles/115005887045-Setup-POP3-and-SMTP-for-Gmail (unrelated but may work)
Please use the following settings for the outgoing email:
SMTP server: send.one.com
Username: your email address
Password: the password you use to log in to Webmail
Port: 587
Secured connection: TLS // (or SSL?)
Please or to participate in this conversation.