在 FastMail里 对其的解释是:
SSL vs TLS vs STARTTLS
There's often quite a bit of confusion around the different terms SSL,TLS and STARTTLS.
SSL and TLS both provide a way to encrypt a communication channel between two computers (e.g. your computer and our server). TLS is the successor to SSL and the terms SSL and TLS are used interchangeably unless you're referring to a specific version of the protocol.
STARTTLS is a way to take an existing insecure connection and upgrade it to a secure connection using SSL/TLS. Note that despite having TLS in the name, STARTTLS doesn't mean you have to use TLS, you can use SSL.
FastMail地址:https://www.fastmail.fm/help/technical/ssltlsstarttls.html
下面是我使用SMTP 选用和不选用的starttls选项时 发送邮件的例子;
不选用下的命令行:
mailsend -f test_email10@126.com -t test_email10@126.com -smtp smtp.126.com -port 25 -user test_email10 -pass test1234 -sub TestEmail -M TestEmail +cc +bc -ehlo
没有加 -starttls,SMTP服务器返回:
*Server supports AUTH LOGIN. Enable with -auth-login or -auth
AUTH LOGIN should be used if server supports STARTTLS (-starttls)
*Server supports AUTH PLAIN. Enable with -auth-plain or -auth
AUTH PLAIN should be used if server supports STARTTLS (-starttls)
2-Error: MAIL FROM failed: '553 authentication is required,smtp7,DsmowADHUpC2V2BUEf8kAw--.529S2 1415600055'
1-Error: Could not send mail
选用情况下的命令行:
mailsend -f test_email10@126.com -t test_email10@126.com -smtp smtp.126.com -port 25 -user test_email10 -pass test1234 -sub TestEmail -M TestEmail +cc +bc -ehlo-starttls
SMTP服务器返回:
Server supports AUTH LOGIN. Enable with -auth-login or -auth
AUTH LOGIN should be used if server supports STARTTLS (-starttls)
*Server supports AUTH PLAIN. Enable with -auth-plain or -auth
AUTH PLAIN should be used if server supports STARTTLS (-starttls)
2-Error: MAIL FROM failed: '553 authentication is required,smtp7,DsmowADHUpC2V2BUEf8kAw--.529S2 1415600055'
1-Error: Could not send mail
根据错误返回 在命令行上 加上 -auth-login 或者 -auth 或者-auth-plain
mailsend -f test_email10@126.com -t test_email10@126.com -smtp smtp.126.com -port 25 -user test_email10 -pass test1234 -sub TestEmail -M TestEmail +cc +bc -ehlo -starttls -auth
SMTP服务器返回:
0-OK: Mail sent successfully