Send gMail with Perl
Despite substantial research and many posts that seem to indicate this isn't too tough, I'm at a loss as to how to send a gMail through Google without the need to connect via SMTP. I've successfully implemented code that polls and posts Google Docs. I would think this would be easier.
Several posts indicate that Email::Send::Gmail is the way to go, but that module is not available via PPM (with all default repositories added).
Could someone please let me know if I'm on the right track?
I apologize for a lack of details, but I'm not sure I know what the exact problem is, so before I post tons of likely开发者_运维百科 irrelevant information, could someone please verify for me that they have successfully implemented the Email::Send::Gmail module and provide an example if so?
You don't have to install Strawberry Perl. You can use ActivePerl with the CPAN archive. However to do that, you have to do a bit of legwork first:
- Go to ActiveState's Perl Package Manager and install the CPAN package.
- Once the package is installed, open a console window and run
cpan
from the command line. Thecpan
process will detect that you don't have the MinGW compiler environment installed, and will install it.
Now that you have cpan working, you need to update it to the latest version of CPAN.
- At the
cpan>
prompt (if you quit out of CPAN already, restart it), runinstall CPAN
. This will load in the latest copy of the cpan utility. - When you get the
cpan
prompt back, runreload
.
Now that CPAN is working and updated, you get to install the Email::Send::Gmail
package:
- At the
cpan>
prompt, type ininstall Email::Send::Gmail
. It might have to install some prerequisites. Basically answer yes to whatever CPAN asks, and you'll be all right.
I just did this myself to verify it works.
If you're on Windows, then I'd recommend using Strawberry Perl and then installing Email::Send::Gmail via CPAN.
精彩评论