Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Using Gmail - making my application secure

by Arik123 (Beadle)
on Aug 12, 2020 at 11:42 UTC ( [id://11120649]=perlquestion: print w/replies, xml ) Need Help??

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

Hi, monks!

I wrote an application that uses Gmail (IMAP and SMTP), using modules I found on CPAN (Email::Send::SMTP::Gmail and Net::IMAP::Simple::SSL). It works... only that Gmail complains that my application is insecure, and wants me to configure my account to allow access for insecure applications.

Is it possible wo access Gmail in a way it'll be happy? to write a secure application in Perl?

Thank you very much!

  • Comment on Using Gmail - making my application secure

Replies are listed 'Best First'.
Re: Using Gmail - making my application secure
by Corion (Patriarch) on Aug 12, 2020 at 11:46 UTC

    Google calls all applications "insecure" that don't use its two-factor authentication.

    If you want to keep using standards like IMAP and SMTP to access email with Gmail, you will have to put up with them calling this insecure.

      Do you mean there's a way to send/receive mail via Gmail without using SMTP/IMAP?

        Yes, you'd have to use the google APIs to send the mssage which involves an OAuth login.

        Good Day,
            Dean

        You can set application specific passwords for applications to use SMTP. I suspect this applies to IMAP, but my success has varied in getting email this way due to rate limiting. A more reliable approach I've found is using fetchmail with gmail to get the mail. If you wish to send many emails (even with a "gmail" address), AWS' Simple Email Service (SES) has proven super reliabe for me and is super cheap.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11120649]
Approved by davies
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (1)
As of 2024-04-25 01:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found