From:                   Nikola Janceski <[EMAIL PROTECTED]>

> Okay I am at a loss here...
> 
> I am using Mail::Sender to generate e-mails from a cgi page.
> I am successful with genereating it using a regular script run from a
> command line.
> 
> But when I put the code into my cgi it gives me this stupid error, (I
> upgraded the module to the latest). The code is almost an exact copy
> of one of the examples in the documentation. And funny how it dies in
> the module and not in my script.
> 
> Here is the code I am using:
> 
> [snip all the checking and crap]
> 
> use Mail::Sender;
> ref($sender = new Mail::Sender
>   {smtp => 'mailhost.xxxx.com'}) || die "$sender --
>   $Mail::Sender::Error\n";
> 
> $sender->OpenMultipart({from => $FORM{'from'}, cc => $FORM{'cc'},
>                        subject => $FORM{'subject'} } ) || die
> "$Mail::Sender::Error\n";

Don't ask me why but ... the method returns a the $sender object if 
successfull and a negative error number if not.

This should be 

ref $sender->OpenMultipart({from => $FORM{'from'}, 
        cc => $FORM{'cc'}, subject => $FORM{'subject'} } ) 
or  die "$Mail::Sender::Error\n";

or

ref( $sender->OpenMultipart({from => $FORM{'from'}, 
        cc => $FORM{'cc'}, subject => $FORM{'subject'} } ) 
) || die "$Mail::Sender::Error\n";

To make things worse ... ->SendFile() return 1 if successfull and 
negative number if not.

Do you get any helpfull error message now?

Sorry, Jenda


=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
                                        --- me

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to