>From:                  "Johnson, Nicole" <[EMAIL PROTECTED]>
>> 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 believe the module is NOT "SendMail", it is "Mail::SendMail". That 
>is a big difference!
>
>Try
>       ...
>       $sm = new Mail::SendMail(...);
>
>Jenda

It's Mail::Sendmail with a lowercase 'm'

And unless I'm running a really old version of it, I don't think it is
object oriented.  The module exports the sendmail() function.  To send mail
to someone, you call the function with a hash as a parameter.

=====================================================
use Mail::Sendmail;
%mail = ( 
        To      => '[EMAIL PROTECTED]',
        From    => '[EMAIL PROTECTED]',
        SMTP    => 'my.mail.server',
        Subject => 'My message',
        Message => "This is a very short message"
);
sendmail(%mail) or die $Mail::Sendmail::error;
=====================================================

There is another SendMail module that is object oriented, but it's not
availible via ppm.  If you want to use that one, you can find it at

        http://www.tneoh.zoneit.com/perl/SendMail/ 


wantor
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to