$cpan -i Email::Send::Gmail CPAN: File::HomeDir loaded ok (v0.80) CPAN: Storable loaded ok (v2.18) Going to read /home/Josh/.cpan/Metadata Database was generated on Sat, 15 Nov 2008 23:26:55 GMT CPAN: YAML loaded ok (v0.66) Going to read /home/Josh/.cpan/build/ ...................................................................... +......DONE Found 52 old builds, restored the state of 52 Running install for module 'Email::Send::Gmail' Running make for L/LB/LBROCARD/Email-Send-Gmail-0.33.tar.gz Has already been unwrapped into directory /home/Josh/.cpan/build/Ema +il-Send-Gm + ail-0.33-tu +JNXE Has already been made Running make test /usr/bin/perl5.10.0.exe "-MExtUtils::Command::MM" "-e" "test_harness(0 +, 'blib/li + b', 'blib/a +rch')" t/*.t t/pod......ok All tests successful. Files=1, Tests=1, 1 wallclock secs ( 0.00 usr 0.00 sys + 0.22 cusr + 0.06 csys + = 0.28 CP +U) Result: PASS LBROCARD/Email-Send-Gmail-0.33.tar.gz /usr/bin/make test -- OK Running make install Prepending /home/Josh/.cpan/build/Email-Send-Gmail-0.33-tuJNXE/blib/ar +ch /home/J + osh/.cpan/b +uild/Email-Send-Gmail-0.33-tuJNXE/blib/lib to PERL5LIB for 'install' Installing /usr/lib/perl5/site_perl/5.10/Email/Send/Gmail.pm Writing /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Email/Send/Gmai +l/.packlis Appending installation info to /usr/lib/perl5/5.10/i686-cygwin/perlloc +al.pod LBROCARD/Email-Send-Gmail-0.33.tar.gz /usr/bin/make install -- OK
But I get this error:#!/usr/bin/perl use strict; use warnings; use Email::Send; use Email::Send::Gmail; use Email::Simple::Creator; my $email = Email::Simple->create( header => [ From => 'me@gmail.com', To => 'me@gmail.com', Subject => 'Works!!', ], body => 'w00t', ); my $sender = Email::Send->new( { mailer => 'Gmail', mailer_args => [ username => 'me@gmail.com', password => 'my_password', ] } ); eval { $sender->send($email) }; die "Error sending email: $@" if $@;
So (perhaps naively) I attempted $ cpan -i Email::Send to which I got$ ./gmailpop.pl Can't locate Email/Send.pm in @INC (@INC contains: /usr/lib/perl5/5.10 +/i686-cygwin /usr/lib/perl5/5.10 /usr/lib/perl5/site_perl/5.10/i686-c +ygwin /usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10/i +686-cygwin /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/vendor_perl +/5.10 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) +at ./gmailpop.pl line 5. BEGIN failed--compilation aborted at ./gmailpop.pl line 5.
$ cpan -i Email::Send + + CPAN: File: +:HomeDir loaded ok (v0.80) CPAN: Storable loaded ok (v2.18) Going to read /home/Josh/.cpan/Metadata Database was generated on Sat, 15 Nov 2008 23:26:55 GMT CPAN: YAML loaded ok (v0.66) Going to read /home/Josh/.cpan/build/ ...................................................................... +......DONE Found 52 old builds, restored the state of 52 Running install for module 'Email::Send' Running make for R/RJ/RJBS/Email-Send-2.192.tar.gz Has already been unwrapped into directory /home/Josh/.cpan/build/Ema +il-Send-2.192-d4Pxon Has already been made Running make test Has already been tested successfully Running make install Already done
In reply to Email::Send::Gmail with Cygwin by JDylan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |