Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 28508
Status: resolved
Priority: 0/
Queue: Email-MIME

People
Owner: Nobody in particular
Requestors: deniswork [...] uzvik.kiev.ua
Cc:
AdminCc:

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



Subject: content type problem
Date: Fri, 27 Jul 2007 13:35:18 +0300
To: bug-Email-MIME-Modifier [...] rt.cpan.org
From: deniswork [...] uzvik.kiev.ua
seem this is bug ... i need that root part of Email-Mime was in such content-type: Content-Type: multipart/mixed; boundary="1185531521.584f33.3756";type="multipart/alternative" But i cant set it via: $email->content_type_set('multipart/mixed; type="multipart/alternative"') because Email::MIME::Modifier 1.442 sub content_type_set { my ($self, $ct) = @_; my $ct_header = parse_content_type( $self->header('Content-Type') ); @{$ct_header}{qw[discrete composite]} = split m[/], $ct; ^^^^^^^^^^^^^ ant this part of my ct(type="multipart/alternative") is broken $self->_compose_content_type( $ct_header ); $self->_reset_cids; return $ct; } how to pass to content-type such type 'multipart/mixed; type="multipart/alternative"' ? Thanks
Sorry for the ridiculously late reply. I hope this reply gives you something to entertain you during the surely excitement-free life in .ua right now. :-/ Anyway, there is apparently no public, good way to do this. What you want is to change one "attribute" of the content type, but only a few of those are made public. The simplest thing to do is to use ->header('Content-Type') to get the content type, then parse it with Email::MIME::ContentType, then alter the "attributes" hashref on the returned hashref. Put a "type" entry into it. (That's $ct->{attributes}{type} = ...) Then call the private $email_mime->_compose_content_type($ct) method. I'll look at improving this more in the future. -- rjbs