[Email] Use exmail.qq.com SMTPS protocol to send email from Alibaba Cloud Cloud
For security reasons, Alibaba Cloud blocks outbound traffic on TCP port 25 by default. that You cannot connect to external addresses TCP port 25 from Alibaba Cloud Cloud servers (ECS).
Background Information
Blocking the outbound direction of TCP 25 port may affect your connection to the SMTP server of a third-party mail service provider through TCP 25 port to send external mail. If you need to use the cloud server on Alibaba Cloud to send external emails, it is recommended that you use Alibaba Cloud Mail products or use the 465 port provided by a third-party mail service provider.
Note If there are special scenarios, you must use TCP port 25 on the cloud server for external connections. Please submit a port 25 unblocking application in the security management and control platform. Alibaba Cloud will review the application reason you submitted and notify you of the review result by email.
Configuration
Remember to replace the content within {{ }}
with your prefer value.
The from_address
and user
must be the same.
1 | smtp: |
FAQs
smtp or smtps.
1 | The $MAIL_URL is 'smtp://...:465'. You probably want 'smtps://' (The 's' enables TLS/SSL) since '465' is typically a secure port. undefined |
Use smtps protocols and 465 port instead of smtp and 25.
Error code 501
1 | Exception in defer callback: Error: Mail command failed: 501 ϵͳÒÑÇ¿ÖÆ¿ªÆôÕʺÅÉý¼¶ÉèÖã¬ÇëµÇ¼exmail.qq.com°ó¶¨Î¢ÐÅ |
This is because Tencent Enterprise Mailbox forced to enable the security certification before send email from client.
You can log in Tencent Enterprise Mailbox Administrator Web UI, find the sender’s account, and edit it to disable enforce secure login
option.
References
[1] 腾讯企业邮箱 - https://exmail.qq.com/
[2] TCP 25端口解封申请 - 阿里云 - https://help.aliyun.com/document_detail/56130.html