[wp-trac] [WordPress Trac] #8887: Ticket #6788 broke postmaster attachment handling

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 19 14:24:51 GMT 2009


#8887: Ticket #6788 broke postmaster attachment handling
--------------------------+-------------------------------------------------
 Reporter:  wwoley        |       Owner:  anonymous               
     Type:  defect (bug)  |      Status:  new                     
 Priority:  normal        |   Milestone:  2.7.1                   
Component:  General       |     Version:  2.7                     
 Severity:  normal        |    Keywords:  email attachments plugin
--------------------------+-------------------------------------------------
 Under ticket #6788 for version 2.7 in file wp-mail.php, the following code
 was added to transform the content from one character set to another.

 if ( function_exists('iconv') && ! empty( $charset ) ) {

 $content = iconv($charset, get_option('blog_charset'), $content);

 }

 The postmaster plugin relied on getting the multipart mime message so it
 could save off an image and video attachment and add the appropriate code
 to reference it. The problem is that the added code seems to assume that
 the message is non mime encoded. One this code is run, the content of a
 mime encoded email is empty. This would impact the ability of any plugin
 to handle mime encoded emails.

 Perhaps the line

 $post_content = apply_filters('phone_content', $content);

 could be moved above the iconv line so that only text remaining after the
 filter would be affected. Another idea would be to put another filter
 before this section specifically to handle multipart mime content

 $post_content = apply_filters('mutipart_mime_content', $content);

 for instance. In the event that wordpress does add the ability to natively
 handle multipart mime, this would give users a chance to override the
 functionality with plugins.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8887>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list