Linux configuration -- ssmtp: Cannot open smtp.gmail.com:587
I encountered the same problem. The following steps worked for me:
- sudo vi /etc/ssmtp/ssmtp.conf
Add the following:
TLS_CA_FILE=/etc/pki/tls/certs/ca-bundle.crt
root=XXXX@gmail.com
mailhub=smtp.gmail.com:587
AuthUser=XXXX
AuthPass=XYXYX
UseSTARTTLS=Yes
UseTLS=Yes
hostname=AAAA
Replace:
XXXX- username(mail)
XYXYX- password(mail password)
AAAA- hostname(get by running $hostname)
- sudo vi /etc/ssmtp/revaliases
Add the following:
root:XXXX@gmail.com:smtp.gmail.com:587
Replace :
XXXX - username(mail)
Try running the mail now:
$mail -s "adasdas" XXXX@gmail.com
CC:
XYZLoremIpsum
.
'ctrl+D'
It solved my problem.
Hopefully for a system(Office) you need to configure correct proxy settings otherwise you will get an error:
cannot send message: Process exited with a non-zero status
Cannot open smtp.gmail.com:587
I Solved it by changing hostname to localhost.
Unable to connect to mail.google.com on motion configuration
Your revaliases file should be pointing to smtp.gmail.com instead of mail.gmail.com. Please try with following in your revaliases file:
root:MyEmailAddress@gmail.com:smtp.gmail.com:587
Related Topics
Need Some Advise to Begin Programming on Arm (With Linux) Platform
How The File Size Is Limited on a Specific File System
How to Simulate a Iret on Linux X86_64
How to Enable Mixed Mode Debugging in Visual Studio Code
Socket Programming Send() Return Value
How to Execute a Command in a Bash Script and Then Focus The Appearing Window
Unexpected Periodic Behaviour of an Ultra Low Latency Hard Real Time Multi-Threaded X86 Code
Removing File from Folder in Linux
Do Here-Strings Undergo Word-Splitting
How to Use 9-Bit Serial Communication in Linux
List Files That Are in Directory1 But Not in Directory2 and Vice Versa
See What Process Last Touched a File
Shell Script to Get List of Defined Users on Linux
Where Is The Linux Socket Implementation
How to Clear Docker Task History
Qt Does Not Create Output Files in Debug/Release Folders in Linux
Print The Lines Between Two Dates from The Log Using Shell Command in Linux