From: "Paul Harwood" <[EMAIL PROTECTED]>
> I am trying to learn the best way to send HTML formatted reports via
> e-mail using the standard modules that come with Perl 5.8. The
> examples I have seen  assign blocks of HTML code to scalars and pass
> them to the NET::SMTP datasend() method etc. I was wondering if there
> was a better, more efficient way of doing this (maybe using
> filehandles?). The FORMAT command works ok for screen output but I
> wanted to have things look fancier when I send the report via email.
> 
> --Paul

What filehandles? Do you think you want a filehandle opened to the 
SMTP server so that you could print to it directly?

You don't want to do that! While it may seem to work fine on your 
current server during testing I assure you it will break later or on 
other servers. (Eg. some SMTP servers are very picky about newlines! 
And did you make sure you double all dots on the beginning of lines?)

Net::SMTP is as low-level as you should get.

And actually I believe you should not go this low. It'd be better to 
use MIME::Lite or Mail::Sender to take care of headers, attachments 
and encodings.

Jenda


===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to