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
This is command for connect
smtp.gmail.com
587
echo -n '{{user_name}}' | base64
echo -n '{{user_password}}' | base64
openssl s_client -connect {{server_name}}:{{server_port}} -crlf -quiet -starttls smtp
and steps to accept message to send
auth login
{{user_name__hash}}
{{user_password__hash}}
helo {{server_name}}
mail from: <{{message_from}}>
rcpt to: <{{message_to}}>
DATA
from: <{{message_from}}>
to: <{{message_to}}>
subject:{{message_subject}}
Content-Type: text/html; charset='UTF-8'; Content-Transfer-Encoding: base64;
MIME-Version: 1.0
{{message_content}}
.
quit