SEND SMTP EMAIL VIA TELNET ( Send Email From Shell Using Gmail )

Open Terminal and Type

perl -MMIME::Base64 -e 'print encode_base64("\000username\@gmail.com\000password")' ## Replace username & password 

Copy the output of the command.(something like AG5pY2UudHJ5QGdtYWlsLmNvbQBub2l0c25vdG15cGFzc3dvcmQ )

Again Type,

openssl s_client -connect smtp.gmail.com:587 -crlf -ign_eof

This will telnet client with ssl enabled

Type

    EHLO localhost
    AUTH PLAIN <your copied text>
    MAIL FROM: <username@gmail.com>
    RCPT TO: <destination@domain.com>
    DATA
    Subject: <your subject>
    <Type Email Body>
    .
    quit

This is how you can send a quick email using your gmail account.