Getting "530 5.7.0 First you need to issue the STARTTLS command." Error sending mail via netcat

I am trying to send an email with netcat, here 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 the STARTTLS command and what do I need to do with it?

+7
smtp netcat
source share
3 answers

STARTTLS is an extension for plain text communication protocols that offers a way to upgrade a simple 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 says that it will not accept text connections.

+8
source share

Basically you need to indicate that you are using TLS.

-one
source share

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

-2
source share

All Articles