Sendmail with gmail / app password

Hi all; I’m trying to send an email from my RUTX11 to my gmail account. I’ve followed the excellent example Sending emails via command line - Teltonika Networks Wiki

However Gmail does not accept untrusted external apps so my login is blocked. How can I get this to work? Eg can sendmail also include the Google mail app password that I can generate via the 2-step verification process within gmail?

Thanks, Simon

Hello,

Yes, Google now requires to use an App password for logging into a Gmail account. This password can be used on RUTX11 instead of your actual email password to send emails.
If you are receiving any errors using the aforementioned method, could you paste the command output log with the sensitive information removed?

Best regards,

Pls note I replaced a what seems like a token key in the sendmail output with “” to not share that code here on the forum.
PS2 the forum does not allow me, as a new user, to post content with multiple web links, so I’ve replaced in the output above things like smpt with ssssmtp, httpssss etc and needed to put spaces inbetween the URL components.

root@Teltonika-RUTX11:/usr/CarpeDiem# sh SendTemps.sh
sendmail: send:‘NOOP’
depth=2 C = US, O = Google Trust Services LLC, CN = GTS Root R1
verify return:1
depth=1 C = US, O = Google Trust Services LLC, CN = GTS CA 1C3
verify return:1
depth=0 CN = sssssmtp. gmail .com
verify return:1
250 SMTPUTF8
sendmail: recv:‘250 2.0.0 OK n17-20020a17090673d100b009fe23c5882asm6554796ejl.97 - gsmtp’
sendmail: send:‘eeeeeEHLO Teltonika-RUTX11 .com’
sendmail: recv:‘250-sssssssmtp. gmail .com at your service, [31.161.186.124]’
sendmail: recv:‘250-SIZE 35882577’
sendmail: recv:‘250-8BITMIME’
sendmail: recv:‘250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH’
sendmail: recv:‘250-ENHANCEDSTATUSCODES’
sendmail: recv:‘250-PIPELINING’
sendmail: recv:‘250-CHUNKING’
sendmail: recv:‘250 SMTPUTF8’
sendmail: send:‘AUTH LOGIN’
sendmail: recv:‘334 ’
sendmail: send:‘’
sendmail: recv:‘334 ’
sendmail: send:‘’
sendmail: recv:‘535-5.7.8 Username and Password not accepted. Learn more at’
sendmail: recv:‘535 5.7.8 httpssss://support. google .com/mail/?p=BadCredentials n17-20020a17090673d100b009fe23c5882asm6554796ejl.97 - gsmtp’
sendmail: failed

Pls note I replaced a what seems like a token key in the sendmail output with “” to not share that code here on the forum.
PS2 the forum does not allow me, as a new user, to post content with multiple web links, so I’ve replaced in the output above things like smpt with ssssmtp, httpssss etc and needed to put spaces inbetween the URL components.

This topic was automatically closed after 15 days. New replies are no longer allowed.