P
Peter J. Holzer
I have tried everything suggested in this thread. Always the result
was the same, even after using cid as directed. I do not understand
why.
However, I do have progress.
In my quest for additional information, I found
Email::MIME::CreateHTML. It does make things much simpler. With it,
I need only two statements to make the message:
my %objects = (
"logo.jpg" => "template.files/image002.jpg"
);
$message = Email::MIME->create_html(
header => [
From => $from_user,
To => $to_user,
Subject => "testing Connie's email",
],
body => $html_template,
embed => 0, #<--
inline_css => 0, #<--
objects => \%objects #<--
);
The improvement this produces is twofold. First, the html body is
invariably properly displayed. Second, ythe linked in image is
displayed in the right place. However, also invariably, only half of
the logo.jpg is displayed; this despite there being enough space being
available in the browser to display it all.
Your script works for me. I get an email which I can display in
thunderbird. A image which is only partially displayed looks like an
encoding problem to me. Are you running on Windows? If so, it is
possible that Email::MIME::CreateHTML doesn't open the image properly in
binary mode (on Unixes there is no difference, so such a bug might go
undetected).
hp