tags:

views:

1419

answers:

7

Hi,

I am in the process of writing an application that sends mail via an valid gmail user id and password.

I just wanted to simulate the SMTP via my windows xp command line, and when I telnet smtp.gmail.com at 465 port - I don't see any thing. A blank command window with title "Telnet smtp.gmail.com" opens with cursor. When I type in "EHLO " or usual SMTP handshake commands, the prompt just closes.

I am unable to figure out whats going wrong and where. I tried connecting to 587, it does not connect in telnet at all. Could any please clarify if I am doing something wrong?

Thanks, J

+2  A: 

Gmail require SMTP communication with their server to be encrypted. Although you're opening up a connection to Gmail's server on port 465, unfortunately you won't be able to communicate with it in plaintext as Gmail require you to use STARTTLS/SSL encryption for the connection.

Jez
so Is there no way I can do it from command line?
Abhishek
+1  A: 

Jadaaih, you can connect send SMTP through CURL - link to Curl Developer Community.

This is Curl Email Client source.

Jasmin25
+1  A: 

Check this post in lifehacker : Geek to Live: Back up Gmail with fetchmail . It uses a command line program. Check and see if it helps. BTW why are you using command line when there are many other nice alternatives?

Shoban
Hey Shoban, I am just trying to find or write an action script that does the mail sending to use it in my flex application
Abhishek
A: 

try this

telnet smtp.gmail.com 587

none
A: 

any way u can convert text to tls to communicate ??

Guest999
A: 

openssl s_client -connect smtp.gmail.com:25 -starttls smtp (for osx' terminal)

Sorin Buturugeanu
A: 

http://www.febooti.com/products/command-line-email/

I tried tht THIS WORKS! cheers :)

yaswanthraj