Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: How to send mail containing multiple lines using Mail::Mailer?

by chargrill (Parson)
on Mar 14, 2007 at 17:37 UTC ( #604867=note: print w/ replies, xml ) Need Help??


in reply to How to send mail containing multiple lines using Mail::Mailer?

Where's the code that fills $mailContents?

Does it perhaps look like this:

my $file = 'mailmessage'; open( my $fh, $file ) or die "couldn't read file - $!"; my $mailContents = <$fh>; close( $fh );

... or similar?

You might instead want:

my $file = 'mailmessage'; open( my $fh, $file ) or die "couldn't read file - $!"; my $mailContents; { local $/; $mailContents = <$fh>; } close( $fh );

HTH



--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)


Comment on Re: How to send mail containing multiple lines using Mail::Mailer?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://604867]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2015-07-30 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls