1
votes

I want to send an email using perl Email module. I have installed Email::Sender. After running the following

sudo perl -MCPAN -e shell
install Email::Sender

and it says Email::Sender is up to date.

But when I run my script I get the following error:

Can't locate Email/Sender/simple.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./first.pl line 8. BEGIN failed--compilation aborted at ./first.pl line 8.

Script:

use Email::Sender::simple qw(sendmail); #line 8
use Email::Simple; #line 9

Any help appreciated.

2

2 Answers

12
votes

The module is called Email::Sender::Simple (with two capital S characters), not Email::Sender::simple

0
votes

Although in perl-CPANEL shows the library installed correctly, it doesn't work, you can try next:

1) install epel repository from rpm (you can find it easy, by searching on google)

2) issue yum repolist

3) issue yum install perl-Mail-Sender.noarch