Peculier Issue with Mail::Sender and the machine

Peculier Issue with Mail::Sender and the machine

am 18.03.2009 17:58:10 von perl perl

--===============2076125188==
Content-Type: multipart/alternative; boundary=0016368e24fca598fb0465679668

--0016368e24fca598fb0465679668
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

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
use Mail::Sender;

$sender = new Mail::Sender { from => 'mail@server.com',
};

$sender->Open({to => 'mail@server.com',
cc => 'mujju@server.com',
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;
--
--
Regards,
Mujju

--0016368e24fca598fb0465679668
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi All,

=A0

  =A0 I have written a code which sends a mail using Mail::Sender =
utility.

When I ran this code at 2 differenct machine (Linux, Solaris), observe=
d the peculier issue.

At Linux this code works fine, and sends the mail.=A0 At solaris this =
is not=A0sending the mail, but no warnings & errors.

I used the specific path where the Mail::Sender utility is install. Yo=
ur help will be greatly appreciated.


#!/usr/bin/perl
#!/apps/perl/5.8.3/bin/perl
use Mail::Sender;


$sender =3D new Mail::Sender { from =3D> server.com'">'mail@server.com',
  =A0 };


$sender->Open({to =3D> ">'mail@server.com',
            =A0=
   cc =3D> 'mujju@=
server.com'
,
              =A0 subje=
ct =3D> 'A machine.'});

=A0$sender->SendLineEnc("I'm sorry, but due to a big load of wo=
rk,
  =A0 I'll come at 10pm at best.");
=A0$sender->S=
endLineEnc("\nMustafa");
=A0$sender->Close;

--
-=
-
Regards,

Mujju


--0016368e24fca598fb0465679668--

--===============2076125188==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============2076125188==--

RE: Peculier Issue with Mail::Sender and the machine

am 18.03.2009 18:55:50 von Brian Raven

From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Perl
Perl
Sent: 18 March 2009 16:58
To: activeperl@listserv.activestate.com
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 => 'mail@server.com',
> };
>
> $sender->Open({to => 'mail@server.com',
> cc => 'mujju@server.com',
> 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
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs