From: "Moonlit Submit" <[EMAIL PROTECTED]>

> Hello,
> Someone from this group gave me that snippet. I apologize for sending
> the whole thing, I am new and thought maybe the whole thing needed to
> be looked at to tell how to code it. I am VERY new lol. But I didn't
> write that code. It was someone named Chas I believe. I am trying to
> use Mail::Sender as it was recommended. I have no idea how to do this,
> but I am ready to learn. I do not know how to define "sendmail". Lisa
> ###############################
> 
> my %email = (
>  Server  => 'relay.moonlitsubmithosting.com',
>  To      => $mlist,
>  From    => "$sub/$listname",
>  Subject => $subject,
>  Message =>
>   "$top_note\n"  .
>   '-' x 72       .
>   "\n$message\n" .
>   '-' x 72       .
>   "\n$bot_note"
> );
> Mail::Sender(%email) or die $Mail::Sender::Error;
> ##############################

Oh well ... there are examples in the docs that come with 
Mail::Sender.

use Mail::Sender;
my $sender = new Mail::Sender {
        smtp  => 'relay.moonlitsubmithosting.com'
};
die "Cannot create Mail::Sender object : $Mail::Sender::Error\n"
        unless ref $sender;

$sender->MailMsg({
        To      => $mlist,
        From    => "$sub/$listname",
        Subject => $subject,
        msg =>
                "$top_note\n"  .
                '-' x 72       .
                "\n$message\n" .
                '-' x 72       .
                "\n$bot_note"
}) > 0
        or die $Mail::Sender::Error;

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