in reply to gmail pop3 authentication

Check this node also Gmail IMAP access

You can use the Mail::POP3Client module. It is used to get the message from the Gmail account.