Hi all -

I'm trying to set up a simple web-based form for a "suggestion box" that
allows people to fill in their ideas, and when they click submit the form
contents actually get sent as an email to a predefined email address.  I
also want the sender to get a copy of their email.

I've tried Mail::Mailer, Mail::POP3Client, and Mail::SMTP and for one reason
or another none of them will achieve what I want.  I'm currently playing
with Sendmail.pm, but get an error that:

Can't locate object method "new" via package "SendMail" (perhaps you forgot
to load "SendMail"?) 

I have removed and reinstalled SendMail via PPM.  And I do have "use
SendMail;" at the top of the Perl file.

This is the perl code:

my $sm = new SendMail("mail.smtp.server");
$sm->From($from_email);
$sm->To($recipient);
$sm->ReplyTo($from_email);
$sm->ErrorsTo();
$sm->Subject($subject);
$sm->setMailHeater("URL", "www.url.com");

my $mailbody = <<_END_MAILBODY_;

Dear $combo_cust_name,

Thank you for contacting us.

You have submitted the following information:

        $comments

Thank you.

_END_MAILBODY_

$sm->setMailBody($mailbody);
if ($sm->sendmail() != 0) {
        printError($sm->{'error'});
        exit;
}


If anyone can help me understand what I'm missing, it'd be appreciated.

Alternatively, does anybody have a working perl sample that sends an email
from a form submission that they would be willing to share?

Oh, and the setup is NT 4, IIS 4, Perl 5.6.1.630.

Many thanks -


M. Nicole Johnson
CACP - Advanced Help Desk
713-420-1096 work
832-724-3215 cell
928-441-2504 efax
mailto:[EMAIL PROTECTED]



******************************************************************
This email and any files transmitted with it from the ElPaso 
Corporation are confidential and intended solely for the 
use of the individual or entity to whom they are addressed. 
If you have received this email in error please notify the 
sender.
******************************************************************
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to