Stoney has asked for the wisdom of the Perl Monks concerning the following question:
The error message is:-#!/usr/bin/perl use CGI; use warnings; use strict; use lib "Mail::SendEasy"; use CGI::Carp qw/fatalsToBrowser/; my $query = new CGI; print $query->header(); print "\@INC is @INC\n<br>"; my $mail = new Mail::SendEasy( smtp => 'localhost' , user => 'foo' , pass => 123 , ) ; my $status = $mail->send( from => 'sender@foo.com' , from_title => 'Foo Name' , reply => 're@foo.com' , error => 'sarah@sarahsfleeces.co.uk' , to => 'sarah@sarahsfleeces.co.uk' , #cc => 'recpcopy@domain.foo' , subject => "MAIL Test" , msg => "The Plain Msg..." , html => "<b>The HTML Msg...</b>" , msgid => "0101" , ) ; if (!$status) { print $mail->error ;} print "it works!";
I'm sure this is just a simple syntax error on my part, maybe to do with how I've 'use'd the module SendEasy but after hours of reading on the net and on here that's the only way I've found for it to not cause an error on that line... any suggestions gratefully received if that's the wrong way to do it. I appreciate I could load it on locally as another option but I don't like giving up that easily! Many thanks SarahCan't locate object method "new" via package "Mail::SendEasy" (perhaps + you forgot to load "Mail::SendEasy"?) at d:\domains\mysite.co.uk\www +root\cgi-bin\Send_Details.pl line 35.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why won't call to SendEasy 'send' sub won't work?
by Corion (Patriarch) on Feb 04, 2009 at 13:01 UTC | |
by Stoney (Novice) on Feb 04, 2009 at 13:27 UTC | |
by Corion (Patriarch) on Feb 04, 2009 at 13:33 UTC | |
by Stoney (Novice) on Feb 04, 2009 at 17:10 UTC | |
by Corion (Patriarch) on Feb 04, 2009 at 17:15 UTC | |
| |
|
Re: Why won't call to SendEasy 'send' sub won't work?
by locked_user sundialsvc4 (Abbot) on Feb 04, 2009 at 14:36 UTC | |
by Stoney (Novice) on Feb 04, 2009 at 17:04 UTC |