develooper Front page | perl.beginners | Postings from September 2009

Re: text html from file to a scalar and mail

Thread Previous
From:
John Plum
Date:
September 16, 2009 15:48
Subject:
Re: text html from file to a scalar and mail
Message ID:
joniplum-BD6CFD.23475516092009@ger.gmane.org
In article <joniplum-C9BE07.14223116092009@ger.gmane.org>,
 John Plum <joniplum@googlemail.com> wrote:
In the test i mentioned previously, the variable to be handed to the 
message body , from the slurp subroutine, should read  ${signature_ref}, 
not $customer_msg_html, as I wrote in the message. I'm sorry, i had 
adapted the script hoping to cut it down, for your ease of reading!

I.E

>use File::Slurp;
>my $signature_ref =
> read_file( "file.html", scalar_ref => 1 ) or die "Couldn't open  $signature_ref $!";



> 
> #TEST 1#
> 
> Email::MIME->create(
>         attributes => {
>             content_type => "text/html",
>             charset      => "UTF-8",
> 
>             #            encoding     => "quoted-printable",
>             disposition => "attachment",
> 
>             #            format       => "flowed",
>         },
>         body => $customer_msg_html,

## Please read as :

body =>${signature_ref},

>     ),
> 
> >#Results :
> 
> >SCALAR(0x83c64d0)
> 
> >(I found the same result with the variable handled as $signature ref)
> 

> --
> http://jakbop.nfshost.com

-- 
--
http://jakbop.nfshost.com


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About