Sending email using Telnet

0

I saw many thread about sending email using Telnet, but I couldn't do that.

I'm trying to connect to yahoo smtp server by :

telnet smtp.mail.yahoo.com 25

The response from server is :

Trying 98.138.105.21...
Connected to smtp.mail.yahoo.com.
Escape character is '^]'.
220 smtp.mail.yahoo.com ESMTP ready

My request is :

ehlo smtp.mail.yahoo.com

The response from server is :

250-smtp.mail.yahoo.com
250-PIPELINING
250-SIZE 41697280
250-8 BITMIME
250 STARTTLS
Connection closed by foreign host.

I don't get OK from server to continuing sending mail...

What am I doing wrong?

Hamed Kamrava

Posted 2014-05-07T19:41:17.330

Reputation: 175

Answers

3

Your ehlo request is wrong.

ehlo or helo should be followed by client name and not server.

So you should enter ehlo your.host.na.me or ehlo your.ip.add.ress.

Can't say if it's related to yahoo server closing connection, but many SMTP servers don't allow clients to impersonate them ;)

I just tried:

220 smtp.mail.yahoo.com ESMTP ready

ehlo 192.168.1.1

250-smtp.mail.yahoo.com
250-PIPELINING
250-SIZE 41697280
250-8 BITMIME
250 STARTTLS

mail from: <>
530 5.7.1 Authentication required

rset
250 2.0.0 OK

quit

Mr Shunz

Posted 2014-05-07T19:41:17.330

Reputation: 2 037

Should I type in sender email password after Authentication required ? – Hamed Kamrava – 2014-05-07T20:20:17.650

What is rset ? – Hamed Kamrava – 2014-05-07T20:30:17.183

1

@HamedKamrava rset simply resets the session so you can start another (i.e. to send another mail). Authentication via telnet can be a bit tricky, as it seems yahoo doesn't support plain authentication. Take a look here: http://www.ndchost.com/wiki/mail/test-smtp-auth-telnet

– Mr Shunz – 2014-05-07T20:32:19.640