Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29767

sending email using ssmtp through ssh raspberry pi

$
0
0

I have a script on my local machine which successfully sends emails using ssmtp, using these instructions. My goal is to now implement this within raspbian on my raspberry pi 4 remotely. Specifically, I'm using an ssh client to access my raspberry pi while within the network, but I'm unable to send emails using the same instructions.

I'm assuming this has something to do with SSH!

I log in using: ssh pi@"ip address"

My mail.err says: "Invalid response SMTP server" My mail.log says: "Invalid response SMTP server"

My ssmtp.config:

## Config file for sSMTP sendmail
##
## The person who gets all mail for userids < 1000
## Make this empty to disable rewriting.
root=username@gmail.com
#
## The place where the mail goes. The actual machine name is required no
## MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com:465
#
## Where will the mail seem to come from?
rewriteDomain=gmail.com
#
AuthUser=username
AuthPass=XXX
FromLineOverride=YES
#UseTLS=YES
#
## The full hostname
hostname=raspberrypi.localdomain
#
## Are users allowed to set their own From: address?
## YES - Allow the user to specify their own From: address
## NO - Use the system generated From: address
FromLineOverride=YES

I have configured my gmail security settings to allow non-secure apps. I have this working beautifully on my local machine!


Viewing all articles
Browse latest Browse all 29767

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>