Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
10 years, 7 months ago
I have configured sSMTP on Ubuntu and it worked fine yesterday. But today when I am trying to send email it shows "ssmtp: Cannot open smtp.gmail.com:587" error message.
$ apt-get install ssmtp
$ vi /etc/ssmtp/ssmtp.conf
$ chmod 640 /etc/ssmtp/ssmtp.conf
$ ssmtp firstname.lastname@example.org
ssmtp: Cannot open smtp.gmail.com:587
Additional info: Yesterday I used public IP, today I am using private IP. I think it is not any problem.
30.4k 7 7 gold badges 77 77 silver badges 122 122 bronze badges
Aug 9, 2012 at 4:10
179 2 2 gold badges 8 8 silver badges 20 20 bronze badges
I had the same problem (in my raspberry), but things changed from one day to another. I mean my ssmtp work fine for months and one day it stopped with the same error of your. I don't know why and what is the cause but after some attempts I added the AuthMethod in my ssmtp.conf and it worked.
Now the file look like this:
Try copy and paste changing your email, password and raspberry name.
Hope it work
Mar 30, 2016 at 16:29
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only