You are indeed specifying a content type of 'text/html' ...

<UPDATE>
but that is the wrong place to set it! The Type attribute in the IO::Socket::INET constructor is for the socket type, not the content type!
</UPDATE>

There is most definitely a better way to send email. It's called MIME::Lite:
use strict; use warnings; use LWP::Simple; use MIME::Lite; my $html = get('http://site.com/pagetest.html') or die "no html\n"; my @mailto = map "ok$_\@ok.com", (1..3); for my $to (@mailto) { my $msg = MIME::Lite->new( From => 'master-ok@ok.com', To => $to, Type => 'text/html', Subject => 'Hell is breaking loose!', Data => $html, ); $msg->send or die "couldn't send message to '$to'\n"; }
UPDATED code: put into for loop to try and mimic the seeker's code.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

In reply to Re: Sending HTML e-mail by jeffa
in thread Sending HTML e-mail by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.