Send e-mails from the Linux Terminal using Google Mail
This is just one of those things where you never know when you might need it, add it to your collection. Once setup it’s quite simple and quick to send an e-mail using the the Gnome-Terminal (or equivalent) in Linux.

So to begin, first we’re going to open the Terminal and install sendemail:
sudo apt-get install sendemailWe also need to install some other packages it relies on:
sudo apt-get install libio-socket-ssl-perl libnet-ssleay-perl perlwget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.55.tar.gzUnpack it:
tar zxvf sendEmail-v1.55.tar.gzCopy it to /usr/local/bin/
sudo cp sendEmail-v1.55/sendEmail /usr/local/binApply the correct Permissions:
sudo chmod +x /usr/local/bin/sendEmailSend the e-mail:
sendEmail -f fromaddress@gmail.com -t toaddress@example.co.uk -u any title you like -m “this is the message” -s smtp.gmail.com -o tls=yes -xu gmailusername -xp gmailpassword
Note: gmailusername doesn’t include the @gmail.com
Tags: email, gnome, Linux, send, terminal



Thanks a lot man !
This is the opposite of useful.
But thanks anyway, seems cool.
I just couldn’t resist practicing using the terminal commands by installing this! Sounds crazy, but I’m a noobie and need all the practice and help I can find.
This is cool because it makes it so easy to send emails in a script!
@mojo – It’s not useful for the unwashed masses. But it’s great for things like automated tasks that you want feedback on in a given condition. Or even better for things like Nagios (if you don’t know, pretend I didn’t mention it). For example, this line in cron is pretty handy:
@reboot root /bin/echo “Oh craps, I think I rebooted” | /usr/bin/mail -s “cron” (insert target email address here)
Every time my box reboots, I get notified and can attend to it. Just one of the many great uses.
[...] This is where I completly drop myself in it, I wrote an article a little while ago which implyed that this was useful. I now see the error of my ways now, it is quite simply sending an e-mail through the Terminal. To see my article and how to do it go to: http://www.turtleblog.co.uk/2009/04/send-e-mail-from-terminal-using-gmail/ [...]
How can I attach files using the same program.
… I’m not sure you can… hmm, maybe I’ll look into it
Looks like you are a true professional. Did ya study about the theme? hrhr