This article mainly introduces the problem of sending emails through SMTP program by Alibaba Mail account.
Detailed Information
The SMTP protocol is used by email clients or code programs to send emails. You need to configure information such as the SMTP server and port.
SMTP Server and Port
SMTP server: smtp.sg.aliyun.com or smtp.[email domain]
SMTP server port: 25(SSL encryption port: 465)
Note
[Email domain] is the domain name of your email address. If you want to use the domain name of your mailbox, please add a CNAME records with the hostname as SMTP. For more information about how to configure DNS resolution, please check How to Setup DNS Resolution of Alibaba Cloud Domain Name for Alibaba Mail?.
You can also use Alibaba Mail official service address: smtp.sg.aliyun.com.
Sample code
If you are a technical developer and need to use code to send SMTP, please refer to the sending example:
Alibaba Mail SMTP Sending Code Example
Troubleshooting
1. After configuration, the email cannot be sent. Please check according to the following suggestions:
Check whether the account password is spelled correctly and do not contain extra characters.
If you use the 465 port, please select Enable SSL.
Check whether the server is correct.
By default, the SMTP sending function is enabled. If the SMTP sending function is not enabled, see Enable the Alibaba Mail SMTP Sending Function.
2. If you need to verify whether the configuration information such as server address, port, account, and password is correct, you can use this parameter to configure it on other third-party clients.
If the email client can be used to successfully send SMTP emails, but the program used to send emails cannot be successfully delivered, you must check whether there is other logic from the program used to send messages. The possible reasons are as follows.
SMTP server configuration error.
The port 25 selected for SMTP sending is not open (SSL encryption port is 465).
Check whether the logic of the sending code is correct. It is recommended to write dead parameters and perform a sending test first.
References
Enable the SMTP Sending Service
Note
The third-party client access is disabled by default for newly purchased users.
If you need to use a third-party client, the postmaster can enable or disable the access of third-party clients.

Log on to the Alibaba Mail by postmaster account and enter the domain Management page by default. Choose DEPTs & Users > Employee Accounts. Click the account name, select Enable POP3/SMTP and Enable IMAP/SMTP, and then click Save.
