getting "530 5.7.0 Must issue a STARTTLS command first." error when sending mail via netcat
Asked Answered
P

3

11

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?

Phosphine answered 11/11, 2013 at 19:14 Comment(0)
S
9

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.

Sension answered 11/11, 2013 at 19:19 Comment(3)
so what are the solutions?Neurophysiology
@Neurophysiology There are no solutions for this question. You cannot send a mail to that server using netcat because of the encryption requirement.Sension
well, I had that problem with EC2 and CakePHP and it turned out I had to add ssl:// to the host to make it work.Neurophysiology
F
-2

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

Fascinator answered 31/7, 2014 at 17:44 Comment(0)
P
-3

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

Presentment answered 20/3, 2015 at 18:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.