Mail:Sender - HTML Mail with alternatives problem

From: Bjoern Raue (br_help_at_gmx.org)
Date: 07/21/04


Date: Wed, 21 Jul 2004 17:44:11 +0200

I'm trying to generate an HTML mail with text alternatives using the
mail:sender module.

As everybody can see below the message was created and received but
neither the HTML part nor the textpart were inserted by mail:sender.

Anybody knows what went wrong? Please don't advise me to use any other
perl mailing modules because my provider only supports the mail:sender.
Thanks for your help.

The perl code:
--------------

eval {
  (new Mail::Sender)
  ->OpenMultipart({
    from => 'someone@somewhere.de',
    smtp => 'mysmtp',
    to => 'someone@somewhere.de',
    subject => 'Multipart Test Page',
    multipart => 'mixed'})
    ->Part({ctype => 'multipart/alternative', disposition => 'NONE'})
      ->Part({ctype => 'text/plain', charset => 'iso-8859-1', encoding
        => '8bit', disposition => 'NONE', msg => 'Hello world'})
      ->Part({ctype => 'text/html', charset => 'iso-8859-1', encoding
        => 'Quoted-printable', disposition => 'NONE', msg =>
           '<html><body><h1>A long</h1><p>mail
           message.</p></body></html>'})
    ->EndPart({"multipart/alternative"})
  ->Close();
} or print "Error sending mail: $Mail::Sender::Error\n";

Received mail as it looks like:
-------------------------------

(...)
X-Mailer: Perl Mail::Sender Version 0.6 Jan Krynicky <Jan@chipnet.cz>
Czech Republic
Subject: Multipart Test Page
MIME-Version: 1.0
Content-type: Multipart/Mixed;
        boundary=Message-Boundary-9140
Date: Wed, 21 Jul 2004 17:26:32 +0200
(...)

--Message-Boundary-9140
Content-type: multipart/alternative
Content-transfer-encoding: 7BIT
Content-disposition: NONE

--Message-Boundary-9140--