As long as you are not using any special characters in the email name or the password , your config file looks correct.
Try logging in to your gmail account from a browser to check the account credentials and to check there are no security messages from google , I have had them refuse to allow a pi to use an account until you ok it via their security check email.
Re: Client email to send emails from command line
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported
The use of crystal balls & mind reading are not supported
Re: Client email to send emails from command line
Sheer stupidity!!! When I created this new Gmail account, I mistyped the userid. A subtle error, an 'n' instead of a 'r' in the middle, so it was not obvious. Thus in my config file I had the wrong Gmail authorized user name. Seems to be working now... Thanks for your time....RDK
Re: Client email to send emails from command line
The old sausage finger problem , makes you look a plonker every time
glad you got it working .
glad you got it working .
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported
The use of crystal balls & mind reading are not supported
Re: Client email to send emails from command line
I'm also having trouble sending mail from the command line, and would really appreciate any help.
Running Pi4 with Raspbian Buster.
My Pi gmail account password uses only lower case letters.
My Pi gmail account also has "Allow less secure apps: ON".
So that's it. It just sort of stops and prints the hostname. I've looked at every post I can find, and I'm stumped.
Running Pi4 with Raspbian Buster.
Code: Select all
$ uname -r
4.19.58-v71+
$ ssmtp -V
sSMTP 2.64 (Not sendmail at all)
$ cat /etc/ssmtp/ssmtp.conf
Debug=YES
root=<my.pi.email.account>@gmail.com
mailhub=smtp.gmail.com:587
RewriteDomain=gmail.com
hostname=localhost
FromLineOverride=YES
AuthUser=<my.pi.email.account>@gmail.com
AuthPass=<password>
UseSTARTTLS=YES
UseTLS=YES
/usr/sbin/ssmtp -v <name>@gmail.com < /home/pi/.bashrc
[<-] 220 smtp.gmail.com ESMTP y23sm31281846pfr.86 - gsmtp
[->] EHLO localhost
[<-] 250 SMTPUTF8
[->] STARTTLS
[<-] 220 2.0.0 Ready to start TLS
[->] EHLO localhost
[<-]
ssmtp: (localhost)
My Pi gmail account also has "Allow less secure apps: ON".
So that's it. It just sort of stops and prints the hostname. I've looked at every post I can find, and I'm stumped.
Re: Client email to send emails from command line
Hi
Not surprised it does not work ssmtp is no longer maintained and will not work with buster.
You now need to switch to msmtp to send mail from buster, there is a thread about it here.
https://www.raspberrypi.org/forums/view ... 8&t=244147
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported
The use of crystal balls & mind reading are not supported
Re: Client email to send emails from command line
I am using ssmtp for cron with buster to send emails to my ISP, but I have been unable to get it to work with gmail.pcmanbob wrote: ↑Thu Aug 22, 2019 12:35 pmHi
Not surprised it does not work ssmtp is no longer maintained andwilldoes not work for gmail with buster
You now need to switch to msmtp to send mail from buster, there is a thread about it here.
https://www.raspberrypi.org/forums/view ... 8&t=244147
For sending email from the cli I also use sendemail.
Code: Select all
sudo apt install sendemail libnet-ssleay-perl libio-socket-ssl-perl
The road to insanity is paved with static ip addresses
Re: Client email to send emails from command line
if you look at the thread I linked , you will see the reason ssmtp does not work in buster is because under buster its trying to use the wrong encryption.
you need to replace ssmtp with msmtp, which will work with mail utils and mpack just as ssmtp did, you can then use it in cron as before.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported
The use of crystal balls & mind reading are not supported
Re: Client email to send emails from command line
Why ?pcmanbob wrote: ↑Thu Aug 22, 2019 1:53 pmif you look at the thread I linked , you will see the reason ssmtp does not work in buster is because under buster its trying to use the wrong encryption.
you need to replace ssmtp with msmtp, which will work with mail utils and mpack just as ssmtp did, you can then use it in cron as before.
Code: Select all
[<-] 220 smtp.strato.de ESMTP RZmta (P11 -)
[->] EHLO raspi1.xxxxxx.xxxxxxxxxxx.de
[<-] 250 HELP
[->] STARTTLS
[<-] 220 Ready to start TLS
[->] EHLO raspi1.xxxxxx.xxxxxxxxxxx.de
[<-] 250 HELP
[->] AUTH LOGIN
[<-] 334 VXNlcm5hbWU6
[->] ZXJuc3RAYm9ra2Vsa2FtcC5kZQ==
[<-] 334 UGFzc3dvcmQ6
[<-] 235 2.7.0 OK Authenticated
[->] MAIL FROM:<[email protected]>
[<-] 250 2.1.0 Sender ok
[->] RCPT TO:<[email protected]>
[<-] 250 2.1.5 Recipient ok
[->] DATA
[<-] 354 3.0.0 Enter data for mail with id 606450v7ME3YqXb
[->] Received: by raspi1.xxxxxx.xxxxxxxxxxx.de (sSMTP sendmail emulation); Thu, 22 Aug 2019 15:03:27 +0100
[->] From: [email protected]
[->] Date: Thu, 22 Aug 2019 15:03:27 +0100
[->] asdasd
[->]
[->] .
[<-] 250 2.0.0 queued as 606450v7ME3YqXb
[->] QUIT
[<-] 221 2.0.0 closing connection
The road to insanity is paved with static ip addresses
Re: Client email to send emails from command line
Why what ?
why does ssmpt use the wrong encryption under buster - I don't know
why is ssmpt no longer maintained - I guess be cause the maintainer has given up on it.
why use msmtp - because it does work when running on buster.
why does ssmpt use the wrong encryption under buster - I don't know
why is ssmpt no longer maintained - I guess be cause the maintainer has given up on it.
why use msmtp - because it does work when running on buster.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported
The use of crystal balls & mind reading are not supported
Re: Client email to send emails from command line
You told me I have to change to msmtp, I told you ssmtp works with my ISP using TLS.
So why do I have to change ?
The road to insanity is paved with static ip addresses
Re: Client email to send emails from command line
if it works with your ISP email then that's great carry on using it.
but most people use gmail with ssmtp because there are lots of examples around on how to set it up on a pi, and that does not work .
sorry of any confusion.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported
The use of crystal balls & mind reading are not supported