Subj : Re: Password Reset email..
To   : Al DeRosa
From : Dan Clough
Date : Sat May 14 2022 01:16 pm

 Re: Re: Password Reset email..
 By: Al DeRosa to Paul Hayton on Sat May 14 2022 06:53 am

>  PH> I'm also wondering how I will keep this option running and have been
>  PH> using Gmail too until now.

> I have tried their apps password, I have tried Yahoo, Hotmail all of them
> have done away with Less Secure apps access, nothing works.. If you figure
> something out let us know.. :) Thanks Paul...

Okay, I've got this sorted out.  I can send automated (from a script or a cron job) emails via gmail.com still, using their "apps password".  Here are the basic steps to get this working:

1. Log in to the gmail account you want to use for the emails.  Since I don't want to 2-factor respond every time I login to one of my "regular" gmail accounts, I created a new account, for use with this automated sending only.

2. Enable the 2-factor authentication for this account.  Somewhere under "Security" in settings.

3. Also in the Security section, you'll see a choice/link for "Apps passwords". Go in there, choose "Other" for the app, then give it a custom name (I chose 'mailx' since that's what's sending my emails). Then click "Generate" and it will give you a 16-character password to use for that account.

4. Have your script or whatever (even an email app like Thunderbird I suppose) log in with the account name and that new password, and it won't ask you for any 2-factor stuff.

For my use (on Linux), I have a mail config file called '.mailrc' in my home directory.  Part of it's contents are:

account ReminderBoy {
set smtp-use-starttls
set ssl-verify=ignore
set smtp=smtp://smtp.gmail.com:587
set smtp-auth=login
set [email protected]
set smtp-auth-password=XXXXXXXXXXXXXXXX
set from="[email protected] (Reminder Boy)"
}

This "account" is referenced from a script that calls the mailing program 'mailx', like this:

cat report | mailx -A ReminderBoy -s "Email subject here" [email protected]

Works like a champ.  :-)

Let me know if any of you have success with this, if you would.
--- SBBSecho 3.15-Linux
* Origin: Palantir * palantirbbs.ddns.net * Pensacola, FL * (1:123/115)