> I have tried the Mail::Sender module, now when I run the
> script, no error
> occurs, but I can't receive any mail, even as I click the
> "Send/Receive"
> button in Outlook.
> Here is my script:
> ----------------------------------------------------------
> use strict;
> use Mail::Sender;
> use CGI qw(:standard);
>
> # Set up hash containing mail message information
> #$sender = new Mail::Sender {};
>
> my %mail = (
>       smtp => '13.198.32.88',
>         from => '[EMAIL PROTECTED]',
>         to => '[EMAIL PROTECTED]',
>         subject => 'Hello!',
>         msg => "I'm sending you a message."
>         );
>
> (new Mail::Sender)->MailMsg(%mail);
>
> print header(), start_html("Sendmail");
> print p("Mail sent successfully!\n");
> print end_html();
>
> exit (0);
> ----------------------------------------------------------

The below sample came right out of Jenda's Mail-Sender examples:
http://jenda.krynicky.cz/perl/Mail-Sender.pm.html#examples
Here is the version I used and it worked the first time through, only thing
I added was your three "use" lines and added the "my" in front of $sender.

#start here
use strict;
use Mail::Sender;
use CGI qw(:standard);

$sender = new Mail::Sender {
                smtp => 'mail.yourISP.com',
                from => '[EMAIL PROTECTED]',
                on_errors => 'code',
        };
        die "Can't create the Mail::Sender object: $Mail::Sender::Error\n"
                unless ref $sender;
        ref $sender->Open({
                to => '[EMAIL PROTECTED], [EMAIL PROTECTED]',
                cc => '[EMAIL PROTECTED]',
                subject => 'Sorry, I\'ll come later.'
        })
                or die "Can't open the message: $sender->{'error_msg'}\n";
        $sender->SendLineEnc("I'm sorry, but thanks to the lusers,
                I'll come at 10pm at best.");
        $sender->SendLineEnc("\nHi, Jenda");
        ref $sender->Close
                or die "Failed to send the message:
$sender->{'error_msg'}\n";
# end here.

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

Reply via email to