From: [email protected]
[mailto:[email protected]] On Behalf Of Perl
Perl
Sent: 18 March 2009 16:58
To: [email protected]
Subject: Peculier Issue with Mail::Sender and the machine

> Hi All,
>  
>     I have written a code which sends a mail using Mail::Sender
utility. 
> When I ran this code at 2 differenct machine (Linux, Solaris),
observed the peculier issue. 
> At Linux this code works fine, and sends the mail.  At solaris this is
not sending the mail, but no warnings & > errors. 
> I used the specific path where the Mail::Sender utility is install.
Your help will be greatly appreciated. 
> 
> #!/usr/bin/perl
> #!/apps/perl/5.8.3/bin/perl

Missing "use strict; use warnings;". You will be doing yourself a favour
by using them in all of your scripts.

> use Mail::Sender;
> 
> $sender = new Mail::Sender { from => '[email protected]',
>     };
> 
> $sender->Open({to => '[email protected]',
>                 cc => '[email protected]',
>                 subject => 'A machine.'});
>  $sender->SendLineEnc("I'm sorry, but due to a big load of work,
>     I'll come at 10pm at best.");
>  $sender->SendLineEnc("\nMustafa");
>  $sender->Close;

As you don't check for errors, it is not entirely surprising that you
don't see any. I am not familiar with Mail::Sender, but a quick glance
at the documentation shows that there are a number of ways to deal with
errors, the simplest being the on_error => 'die' parameter to the object
constructor. There are also some debugging options.

HTH

-- 
Brian Raven 
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to