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.
In reply to Why won't call to SendEasy 'send' sub won't work? by Stoney
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |