Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Using Gmail - making my application secure

by Arik123 (Sexton)
on Aug 12, 2020 at 11:42 UTC ( #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 (Pope) 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
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? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2020-12-01 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?