Python can't send email.
My last operation and maintenance staff, the script is completely fine, but the use of Aliyun machine, Ali by default forbids port 25 to send out, the script uses port 25
So every time you send an email, you report an error, and there is no problem checking the script. All kinds of Baidu saw that Ali banned port 25, which was successfully modified to port 465.
You can send an email.