This is what I found Googling on how to send an email using the commandline:
1. Connect to Gmail smtp server:
openssl s_client -connect smtp.gmail.com:465 -crlf -ign_eof
2. helo google
3. ehlo google
4. AUTH LOGIN
5. <enter Base64 encoded userid of your Gmail account>
6. <enter Base64 encoded password of your Gmail account>
7. MAIL FROM: <your emailaddress>
8. RCPT TO: <receipt emailaddress>
9. DATA
10. FROM your name <your emailaddress>
11. TO recipient name <recipient emailaddress>
12. Subject: your subject
13. Some body text
14. . (a dot to finish and send the email)
15. quit