Created
August 28, 2019 04:06
-
-
Save kizashi1122/ed9323918acd77d0f225e486ca469f60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use v5.28; | |
use utf8; | |
use Net::POP3; | |
use Net::POP3::XOAuth2; | |
my $user = 'myaccount@example.com'; | |
my $token = 'ya29.GltdBxoUGp4......'; # retrieve with OAuth2 | |
my $pop = Net::POP3->new('pop.gmail.com', Port => 995, Timeout => 30, SSL => 1, Debug => 1); | |
$pop->xoauth2($user, $token); | |
$pop->quit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment