SMTP starttls选项

  在 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


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值