How to – Send mail with Google SMTP – Ubuntu 14.04
I am gonna show how you can send mail with Google SMTP in a few steps on your Ubuntu 14.04 LTS Server or any Debian systems
Step 1. Install SMTP
run the command in your terminal
1 | sudo apt-get install ssmtp |
Step 2. Configure SMTP
We are gonna open the SMTP config file and add the content below to the file.
Open config file and paste the content in the end line
1 | sudo nano /etc/ssmtp/ssmtp.conf |
1 2 3 4 5 6 7 | Root=your_email@gmail.com Mailhub=smtp.gmail.com:465 RewriteDomain=gmail.com AuthUser=your_gmail_username # (before the @gmail.com part) AuthPass=your_gmail_password FromLineOverride=Yes UseTLS=Yes |
Step 2. Test SMTP
to test our SMTP we are gonna download send mail client
1 | sudo apt-get install heirloom-mailx -y |
try to send a mail with this command
1 | echo testing|mail -s 'Test Mail' Insert email address to send to here |







