Send Emails From Terminal Using Gmail

Linux terminal is one of the coolest tools I’ve ever come across Note: I’ve tested these steps on Ubuntu 12.04 and Fedora 16. Security certificate Before proceeding, we need Gmail’s security certificate on our system. Why? Gmail sends encrypted data over SSL (Secure Sockets Layer) for security; this certificate is necessary for encryption of data. Ideally, you should have the file Equifax_Secure_CA.crt under /usr/share/ca-certificates/mozilla/ . If you do, you’re ready to move on. SSL Certificate We want to connect to Google securely which means you'll need the latest SSL certificates. To get those, use the openssl client onyour machine. Run: openssl s_client -connect imap.gmail.com:993 -showcerts which should show two blocks of ----- BEGIN CERTIFICATE ----- ... ----- END CERTIFICATE ----- in the output. You'll want to take each block (including the BEGIN/END CERTIFICATE lines), and put each of them into their own file. I put the first one ...