in reply to Sending Rich/HTML email

You should use either Mime::Lite or MIME::Entity as they were designed to take the heartache out of doing this. Anyway your problem is you hand rolled formatting is wrong. Amongst other things you need:

boundary="some_string" --some_string what's this eh, we need two leading -- for the boundary --some_string blah, note extra two -- on end of closing boundary below --some_string--

You have random spaces, no quotes (optional but good), missing leading and trailing -- and no closing boundary so your boudaries are broken. Here is an example generated using MIME::Entity that shows you the correct format. It also shows you how easy it is to use. You can attach text, html, binary files (images etc):

use MIME::Entity; my $html = "<html>\n<head>\n</head>\n<body>\n <p>This is some text\n< +/body>\n</html>\n"; my $text = "This is some text\n"; ### Create the top-level, and set up the mail headers: $top = MIME::Entity->build(Type => "multipart/alternative", From => 'me@myhost.com', To => 'you@yourhost.com', Subject => "Hello World!"); $top->attach(Data => $text, Type => "text/plain", Encoding => "quoted-printable"); $top->attach(Data => $html, Type => "text/html", Encoding => "quoted-printable"); $top->print(\*STDOUT); __DATA__ Content-Type: multipart/alternative; boundary="----------=_1020843667-205993-0" Content-Transfer-Encoding: binary MIME-Version: 1.0 X-Mailer: MIME-tools 5.316 (Entity 5.212) From: me@myhost.com To: you@yourhost.com Subject: Hello World! This is a multi-part message in MIME format... ------------=_1020843667-205993-0 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: quoted-printable This is some text ------------=_1020843667-205993-0 Content-Type: text/html Content-Disposition: inline Content-Transfer-Encoding: quoted-printable <html> <head> </head> <body> <p>This is some text </body> </html> ------------=_1020843667-205993-0--

As an additional comment print MAIL "blah"; print MAIL "blech"...on and on could be replaced with a nice neat heredoc like this:

$message = <<"END_MESSAGE"; To: $email Reply-to: <$our_email> From: $us <$our_email> Subject: $list_name Hello $name, $message $us END_MESSAGE open ('MAIL', "|$mail_prog -t -i") or DieNice("Can't open '$mail_prog' +: $!\n"); print MAIL $message;

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print