getting “530 5.7.0 Must issue a STARTTLS command first.” error when sending mail via netcat

只谈情不闲聊 提交于 2019-11-30 23:53:40

问题


I'm trying to send an email with netcat, this is what i get:

****-MacBook-Pro:~ ***$ nc smtp.gmail.com 25
220 mx.google.com ESMTP h8sm66301168eew.16 - gsmtp
Helo gmail.com
250 mx.google.com at your service
MAIL FROM: <******@gmail.com>
530 5.7.0 Must issue a STARTTLS command first. h8sm66301168eew.16 - gsmtp

what is STARTTLS command and what do i need to do with it?


回答1:


STARTTLS is an extension to plain text communication protocols, which offers a way to upgrade a plain text connection to an encrypted (TLS or SSL) connection instead of using a separate port for encrypted communication.

http://en.wikipedia.org/wiki/STARTTLS

The smtp server is saying it won't accept plain text connections.




回答2:


You basicaly just need to specify that you're using TLS.




回答3:


Use EHLO instead of HELO. This will start 250-STARTTLS.



来源:https://stackoverflow.com/questions/19914036/getting-530-5-7-0-must-issue-a-starttls-command-first-error-when-sending-mail

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!