IvanH has asked for the wisdom of the Perl Monks concerning the following question:

I use the module Email-Send-SMTP-Gmail to send emails via a PERL program. This requires turning on "Less Secure App Access" in the sending Gmail account. Google is going to remove this option on May 30. Is there another way to send emails using PERL?

Replies are listed 'Best First'.
Re: Sending emails
by hippo (Archbishop) on Mar 14, 2022 at 00:03 UTC
Re: Sending emails -- gmail Less Secure App Access May 2022
by Discipulus (Canon) on Mar 14, 2022 at 12:15 UTC
    Hello IvanH,

    I suppose this article to be relevant, specifically Use an App Password section and the the linked Sign in with App Passwords.

    I hope you can try this way and share your founds findings, because many other may need this in the future.

    Thanks for pointing me to this near future change

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

      Thanks so much for the help. Setting up an App Password worked. For others who might need it the process was as follows:

      I set up two step verification in the sending gmail account. With Less Secure App Access turned off I tried sending an email and got the following error message.

      Can't locate object method "send" via package "5.7.9 Application-specific password required. Learn more at " (perhaps you forgot to load "5.7.9 Application-specific password required. Learn more ate552d27sm669322pjt.11 - gsmtp "?) at sndmlonefbctest.pl line 63, <STDIN> line 1.econdFactor i2-20020a17090ac40200b001bd0e552d27sm669322pjt.11 - gsmtp

      I then went to security settings on the gmail account and selected Set up an App Password. One the next screen I selected Mail in the app dropdown and Windows Computer in the device dropdown. When I clicked the generate button it came back with a 16 character App Password with instructions to replace the Password used by my mail program with the App Password. I did that and it worked like a charm.

      Thanks again for the help.

Re: Sending emails
by cavac (Prior) on Mar 15, 2022 at 12:19 UTC

    Google removing "Less Secure App Access"? Does that mean locking out Android Mail and Outlook?

    SCNR

      yahoo, i think, had something similar a year or 2 ago and at least thunderbird caught up with it quickly and works fine since. let's hope that this new "feature" will give them enough assurances that it is really me when I accidentally enter a vpn with email client on and all alarms ring in their HQ.