Skip Menu |
 

This queue is for tickets about the MIME-tools CPAN distribution.

Report information
The Basics
Id: 61137
Status: resolved
Priority: 0/
Queue: MIME-tools

People
Owner: dfs+pause [...] roaringpenguin.com
Requestors: rogerespel [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: support for multipart/related
Date: Tue, 7 Sep 2010 09:00:20 -0700 (PDT)
To: bug-MIME-tools [...] rt.cpan.org
From: roger espel llima <rogerespel [...] yahoo.com>
Download (untitled) / with headers
text/plain 1.5k
hello, I'm writing to ask about support for "multipart/related" messages within MIME::Tools.  Specifically, RFC2387, which specifies this type of multipart message, states that the Content-type line needs to have a "Type" parameter specifying the content-type of the main part of the message. ex. Content-type: multipart-related; boundary="--1234"; Type="text/html" As far as I can see, there is no way in MIME::Tools to pass this "type" parameter when creating the object:   my $top = MIME::Entity->build(           From            => $from,           To              => $to           Subject         => $subject,           Type            => 'multipart/related',       # need to add: ; type="text/html"   ); It would be nice to be able to pass a parameter like subtype => "text/html", or main_type => "text/html".  Otherwise the generated messages are not RFC-compliant, which causes real world problems (e.g Yahoo Mail doesn't display the message properly). It would be even nicer if MIME::Tools had an automatic check for multipart/related, and added this field on its own, based on the content-type of the first part of the node. I have been able to find a work-around, but it is not particularly nice:   # add the "type" param for multipart/related   my $ct = $top->head->get("Content-type");   $top->head->replace("Content-type", qq{$ct; Type="text/html"}); thanks in advance, and thanks for your wonderful and very useful work!!    roger
Download (untitled) / with headers
text/plain 356b
On Tue Sep 07 12:00:35 2010, rogerespel@yahoo.com wrote: Show quoted text
> # add the "type" param for multipart/related > my $ct = $top->head->get("Content-type"); > $top->head->replace("Content-type", qq{$ct; Type="text/html"});
Can't you do this? $top->head->mime_attr('content-type.type' => 'text/html'); That seems pretty simple and clean to me. Regards, David.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.