My requirements are:
- send an email from the terminal (for the sake of batch processing)
- attach a pdf file to that email (the pdfs would be identical for all recipients, except for a watermark)
- specify a reply-to address (email@example.com)
I've tried the "simplest answer to sending one-line messages via gmail is to use ssmtp", and several variants, and keep getting:
laptop sSMTP: Authorization failed (535 5.7.8 https://support.google.com/mail/?p=BadCredentials d13sm3920147qkj.27 - gsmtp)
- IMAP enabled
- Allow less secure apps is ON
ssmtp.conf setup that I tried, I have done DisplayUnlockCaptcha just before:
$echo "Testing...1...2...3" | ssmtp firstname.lastname@example.org
Looking at the stated thread alone, there is no consensus as to how
/etc/ssmtp/ssmtp.conf should be set up:
hostname=localhostvs whatever was put there as the default (in my case,
Could someone make a suggestion to sort this out, and possibly paste in full a working conf file?
There is a claim in a thread from 2017, that:
You can not use external applications with your normal password, you must go to https://security.google.com/settings/security/apppasswords
Is that the case? (I'm not able to do it)
What alternatives are there?
- OS: Linux Mint 19 Tara
- ssmtp was tested from a clean install preceded by upgrade/update
- a couple of years ago, I was a able to send emails using the same OS (earlier version)
- To make sure the value of AuthPass is correct, I used it to manually log into my google account.