Issue with Mail::Sender : Help needed

--===============1994166116==
Content-Type: multipart/alternative; boundary=0016e644b99e71c39404644ab877

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

Dear All,

I am getting the below error for Mail::Sender utility. Which sends the mail.
Your help will be a great help for me. Error is,
*Can't find string terminator "*END*" anywhere before EOF at Mail_Attach.pl
line 18.
*

Please find the complete code as below,



#!usr/local/bin/perl -w

use Mail::Sender;

$Sender = new Mail::Sender ( {
from => 'mail_id [at] network.com',
Error => 'Code'
} )
or die " Can't create the sender object
$Mail::Sender::Error \n";
$Sender -> OpenMultipart ( {
to => 'maid_id2 [at] network.com',
cc => 'mail_id4 [at] network.com',
subject => 'Checked out Reminder'
} )
or die " Can't open Multiple connection $Sender ->
{'Error'} \n";
*#$Sender->Body({ msg => <<'*END*' }); # error is here
*$Sender->Body;
*$Sender->SendEnc(<<'*END*'); # if I use this code, then error
is here.*

Hi User,
How are you ?
Long time to send a mail.
Here is a new module Mail::Sender.

*END*

$Sender -> Attach ( {
description => 'File file.txt is checked out',
ctype => 'application/x-zip-encoded',
encoding => 'Base64',
disposition => 'attachment; filename="file.zip"; type="ZIP
archive"',
file => 'file.zip'
})
or die " Can't attach the file : $Sender -> {'Error_Code'} \n";

$Sender -> Close() or die " Can't Send the mail $Sender -> { 'Error' } \n";



Regards,

Mujju

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

<div>
<p>Dear=A0All,</p>
<p>I am getting the below error for Mail::Sender utility. Which sends the m=
ail. Your help will be a great help for me. Error is,</p>
<div><strong>Can't find string terminator "*END*" anywhere be=
fore EOF at Mail_Attach.pl line 18.<br></strong></div>
<p>Please find the complete code as below,</p>
<p>=A0</p>
<p>#!usr/local/bin/perl -w</p>
<p>use Mail::Sender;</p>
<p>$Sender =3D new Mail::Sender ( {<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0 from =3D> <a href=3D"mailto:'mail_id [at] net=
work.com'">'mail_id [at] network.com'</a>,<br>=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Error =3D> 'Code'<br>=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 } )<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 or die " =
Can't create the sender object $Mail::Sender::Error \n";<br>$Sende=
r -> OpenMultipart ( {<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 to =3D> <a href=3D"mailto:'maid_id=
2 [at] network.com'">'maid_id2 [at] network.com'</a>,<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=
=A0 cc =3D> <a href=3D"mailto:'mail_id4 [at] network.com'">'mail_=
id4 [at] network.com'</a>,<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 subject =3D> 'Checked out Reminder=
'<br> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=
=A0=A0 } )<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0 or=
die " Can't open Multiple connection $Sender -> {'Error=
9;} \n";<br><strong>#$Sender->Body({ msg =3D> <<'*END*=
' });=A0=A0 =A0 # error is here<br></strong>$Sender->Body;<br>
=A0<strong>$Sender->SendEnc(<<'*END*');=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 =A0# if I use this code, then error is here.</strong></p>
<p>Hi User,<br>=A0=A0 How are you ?=A0<br>=A0=A0 Long time to send a mail.<=
br>=A0Here is a new module Mail::Sender.</p>
<p>=A0*END*</p>
<p>$Sender -> Attach ( {<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 description =
=3D> 'File file.txt is checked out',<br>=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0 ctype =3D>=A0=A0=A0=A0 'application/x-zip-encoded',<br>=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 encoding =3D> 'Base64',<br>=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 disposition =3D>=A0 'attachment; filename=
=3D"file.zip"; type=3D"ZIP archive"',<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 file =3D> 'file.zip'<br>=A0=A0=A0=
=A0=A0=A0=A0=A0=A0 }) <br>=A0=A0=A0=A0=A0=A0=A0=A0=A0 or die " Can'=
;t attach the file : $Sender -> {'Error_Code'} \n";</p>
<p>$Sender -> Close() or die " Can't Send the mail $Sender ->=
; { 'Error' } \n";</p>
<p>=A0</p>
<p>Regards,</p>
<p>Mujju</p>
<p>=A0</p></div>
<div>=A0</div>

--0016e644b99e71c39404644ab877--

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

_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1994166116==--
perl perl [ Mi, 04 März 2009 14:06 ] [ ID #1991988 ]

RE: Issue with Mail::Sender : Help needed

From: activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] On Behalf Of Perl
Perl
Sent: 04 March 2009 13:07
To: activeperl [at] listserv.activestate.com
Subject: Issue with Mail::Sender : Help needed

> Dear All,
>
> I am getting the below error for Mail::Sender utility. Which sends the
mail. Your help will be a great help for > me. Error is,
>
> Can't find string terminator "*END*" anywhere before EOF at
Mail_Attach.pl line 18.
>
>
> Please find the complete code as below,
>
> #!usr/local/bin/perl -w

'use strict;' missing.

>
> use Mail::Sender;
>
> $Sender = new Mail::Sender ( {
> from => 'mail_id [at] network.com',
> Error => 'Code'
> } )
> or die " Can't create the sender object
$Mail::Sender::Error \n";
> $Sender -> OpenMultipart ( {
> to => 'maid_id2 [at] network.com',
> cc => 'mail_id4 [at] network.com',
> subject => 'Checked out Reminder'
> } )
> or die " Can't open Multiple connection
$Sender -> {'Error'} \n";
> #$Sender->Body({ msg => <<'*END*' }); # error is here
> $Sender->Body;
> $Sender->SendEnc(<<'*END*'); # if I use this code, then
error is here.
>
> Hi User,
> How are you ?
> Long time to send a mail.
> Here is a new module Mail::Sender.
>
> *END*
>
> $Sender -> Attach ( {
> description => 'File file.txt is checked out',
> ctype => 'application/x-zip-encoded',
> encoding => 'Base64',
> disposition => 'attachment; filename="file.zip"; type="ZIP
archive"',
> file => 'file.zip'
> })
> or die " Can't attach the file : $Sender -> {'Error_Code'}
\n";
>
> $Sender -> Close() or die " Can't Send the mail $Sender -> { 'Error' }
\n";

What makes you think your problem is anything to do with Mail::Sender?
(Hint: it isn't.)

It looks like your terminator might have a space in front of it.

There is a FAQ about this, see 'perldoc -q "here doc"'. Also, if you had
tried adding 'use diagnostics;' (one of the first things to try if you
can't understand a perl error or warning message) it would have
explained the error in more detail, including a hint as to where the
problem was.

HTH

--
Brian Raven



------------------------------------------------------------ -----------------------------------------------
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Brian Raven [ Mi, 04 März 2009 14:45 ] [ ID #1991989 ]
Perl » gmane.comp.lang.perl.active-perl » Issue with Mail::Sender : Help needed

Vorheriges Thema: upgrades
Nächstes Thema: I'm new to Perl and I'm stuck