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 connection on my Windows XP
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?