[wp-trac] Re: [WordPress Trac] #5204: wp_mail Does Not Detect Custom Boundaries in "Multipart/Mixed" Email Headers

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 15 18:27:25 GMT 2007


#5204: wp_mail Does Not Detect Custom Boundaries in "Multipart/Mixed" Email
Headers
----------------------------------------------------------------+-----------
 Reporter:  Ghidra99                                            |        Owner:  anonymous
     Type:  defect                                              |       Status:  new      
 Priority:  normal                                              |    Milestone:  2.3.1    
Component:  General                                             |      Version:  2.3      
 Severity:  major                                               |   Resolution:           
 Keywords:  wp_mail, email, multipart, mixed, header, boundary  |  
----------------------------------------------------------------+-----------
Comment (by filosofo):

 The problem is that wp_mail assumes the content-type is text, and it ends
 up thinking the boundary is the text encoding, or it ignores the boundary
 altogether.

 My patch fixes wp_mail so that one can send attachments using custom
 headers.

 I've also attached a test email message.  Send it to yourself using
 sendmail, e.g.
 {{{sendmail [name]@[domain].com < test_email.txt}}}

 and it works.

 Try to send it using wp_mail, with the 2-4 lines as custom headers, and it
 currently fails.

 Apply my patch, then try sending it via wp_mail, and it works.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5204#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list