Wouldn’t it be useful if your computer could email you? I’d like to be notified by email when my server is in trouble, but I don’t want to run my own mail server. sSMTP is perfect for this; it’s a simple way to send email from your system to an SMTP mail server, like Gmail’s.
Here’s how I set up sSMTP on Ubuntu to send mail through my Gmail account.
Install sSMTP from the package
ssmtp (click the link to install), or by running the command below in your terminal:
sudo apt-get install ssmtp
sSMTP can be configured from one text file. Open
/etc/ssmtp/ssmtp.conf in a text editor:
sudo gedit /etc/ssmtp/ssmtp.conf
The configuration file is very short and well commented by default. Here’s the options I use for sending mail through Gmail:
root=myemailaddress@gmail.com<br />mailhub=smtp.gmail.com:587<br />AuthUser=mygmailusername<br />AuthPass=mypassword<br />UseSTARTTLS=YES
If you’re using Gmail like I am, change the
root,
authuser, and
authpass options to the email address, username, and password of your Google account. If you’re using another mail service you’ll need to change
mailhub to the relevant SMTP server.
(
Read more
)