in reply to Why won't call to SendEasy 'send' sub won't work?

This line looks fishy:

use lib "Mail::SendEasy";

as that line implies that your host has a directory Mail::SendEasy, under which there is a file Mail/SendEasy.pm. But if that is what your host says to you, all I can recommend is using an absolute directory name instead of using a relative directory name, like use lib "/home/Stoney/Mail::SendEasy/";

You need to actually use the module before you can use routines from the module:

use Mail::SendEasy;

will do that.

Replies are listed 'Best First'.
Re^2: Why won't call to SendEasy 'send' sub won't work?
by Stoney (Novice) on Feb 04, 2009 at 13:27 UTC
    Hi thanks for this, I don't know the absolute directory for SendEasy but will try to find out... I've added the line after the other 'use's:-
    use Mail::SendEasy;
    and have gone back to my original error which lead me to put the quotes and lib bit in the 'use' line:-
    Can't locate Mail/SendEasy.pm in @INC (@INC contains: Mail::SendEasy d +:/perl/site/lib d:/perl/lib .) at d:\domains\sarahsfleeces.co.uk\wwwr +oot\cgi-bin\Send_Details.pl line 8. BEGIN failed--compilation aborted at d:\domains\sarahsfleeces.co.uk\ww +wroot\cgi-bin\Send_Details.pl line 8.

      So it would seem that you need to go back to Difficulty in sending mail with Activestate Perl 5.10 on a windows server, and the answers you received there, and possibly, again, consult with your hosting administrator as to where the Mail::SendEasy module is installed. Note that Mail::SendEasy is different from Mail::SendMail which you mention in your thread root, so you may want to check and clarify with your hosting support or the mails you sent them about whether the recommended solution is Mail::SendMail or Mail::SendEasy.

        #!/usr/bin/perl Ok I've gone back to previous replies and put SendEasy and the folders and files below it in mylib directory as described:-
        use CGI; use warnings; use strict; use lib 'd:/domains/sarahsfleeces.co.uk/wwwroot/cgi-bin/mylib'; use CGI::Carp qw/fatalsToBrowser/; use Mail::SendEasy;
        and it then produces this error:-
        Can't load 'd:/perl/lib/auto/IO/IO.dll' for module IO: load_file:Acces +s is denied at d:/perl/lib/XSLoader.pm line 64. at d:/perl/lib/IO.pm line 11 Compilation failed in require at d:/perl/lib/IO/Handle.pm line 263. BEGIN failed--compilation aborted at d:/perl/lib/IO/Handle.pm line 263 +. Compilation failed in require at d:/perl/lib/IO/Socket.pm line 11. BEGIN failed--compilation aborted at d:/perl/lib/IO/Socket.pm line 11. Compilation failed in require at d:/domains/sarahsfleeces.co.uk/wwwroo +t/cgi-bin/mylib/Mail/SendEasy/SMTP.pm line 50. BEGIN failed--compilation aborted at d:/domains/sarahsfleeces.co.uk/ww +wroot/cgi-bin/mylib/Mail/SendEasy/SMTP.pm line 50. Compilation failed in require at d:/domains/sarahsfleeces.co.uk/wwwroo +t/cgi-bin/mylib/Mail/SendEasy.pm line 29. BEGIN failed--compilation aborted at d:/domains/sarahsfleeces.co.uk/ww +wroot/cgi-bin/mylib/Mail/SendEasy.pm line 29. Compilation failed in require at d:\domains\sarahsfleeces.co.uk\wwwroo +t\cgi-bin\Send_Details.pl line 10. BEGIN failed--compilation aborted at d:\domains\sarahsfleeces.co.uk\ww +wroot\cgi-bin\Send_Details.pl line 10.
        Which is odd because I thought it wasn't dependant on anything else?! So presumably I can go to the latest version of these files (that's compatible with this version of SendEasy) and copy these into 'mylib' too can I? Presumably I could end up copying half of Perl into the 'mylib' area though? Cheers Sarah