Using ssmtp to send mail using gmail.
First install the package ssmtp using the command:
1
|
Open the configuration file for ssmtp as root user:
1
|
Make the following changes to the configuration file:
root=**username**@gmail.com
mailhub=smtp.gmail.com:587
hostname=**username**@gmail.com
UseSTARTTLS=YES
AuthUser=username
AuthPass=password
FromLineOverride=yes
In order to make the default (root) “from” field be the server name,
edit the /etc/ssmtp/revaliases file as root user :
1
|
And add into it the desired translation which in our Gmail examples case
will be:
root:test@example.com:smtp.gmail.com
and time to test:
1
|
If this does not work, then you can try with -v or -vv or -vvv for ssmtp command.
Related articles
- The emacs 30 Day Challenge: Using ‘gnus’ to read mail (mostlymaths.net)
- How to Verify an Email Address? (labnol.org)
- Cannot Get Mail Gmail IMAP Not Responding Error on iPhone, iPad or Mac (mydigitallife.info)
Related Articles:
- 2010/07/20 Linux command to repeat a string n times - Super User
- 2010/12/26 Empty a file
- 2010/11/13 Fundraising for Linux Foundation.
- 2010/09/13 15 (More) Awesome Conky Configurations
- 2010/09/04 Remove some path from the PATH variable temporarily.
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.