问题
How can I send email using Perl through my Gmail account? The one CPAN library (Mail::Webmail::Gmail) that I tried didn't work and I don't see much activity with it.
At the moment I really only need to send a message. However, the advanced functionality of getting my contacts, acting when a new email is received that has a certain label, etc. certainly seems appealing for another day.
回答1:
Did you try Email::Send::Gmail?
回答2:
You could always send with SMTP. The server is smtp.gmail.com, it requires TLS and uses authentication. You may also have to enable POP/IMAP in your account.
回答3:
I had the same problem with Mail::Webmail::Gmail, I ended up using Net::IMAP::Simple::SSL to get my mail from gmail. I'd guess if I had to try to send mail with it I would first try Net::SMTP::Server .
回答4:
I have extended WWW::Contact::GoogleContactsAPI to get all the contact fields. See:
Is there a Perl module to interface to Google Contacts API?
来源:https://stackoverflow.com/questions/279757/how-can-i-send-mail-through-gmail-with-perl