Sending Emails from a Ubuntu Server - GMail

Reblogged from A bit of Computer Science:

Click to visit the original post

1)Instal SSMTP:

sudo apt-get install ssmtp

2)Edit /etc/ssmtp/ssmtp.conf

mailhub=smtp.gmail.com:587
hostname=USER@MYDOMAIN.com
root=USER@MYDOMAIN.com
AuthUser=USER@MYDOMAIN.com
AuthPass=PASSWORD
UseSTARTTLS=yes
UseTLS=yes
FromLineOverride=yes

3)Edit /etc/ssmtp/revaliases

This step is important!

root:USER@MYDOMAIN.com:smtp.gmail.com:587
matt:USER@MYDOMAIN.com:smtp.gmail.com:587

4)Send a Test E-mail

ssmtp test@test.com
To: Test Guy <test@test.com>
From: Me <USER@MYDOMAIN.com>
Subject: Hello World

Hello world!

About anthonyvenable110

As you can see I love working with various Linux Operating Systems, as well as programs that are Open-Source in nature. Speaking of nature, I love long walks where there is plenty of it.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s