[wp-trac] [WordPress Trac] #28059: Inline image attachments with wp_mail()

WordPress Trac noreply at wordpress.org
Tue Apr 29 13:28:11 UTC 2014


#28059: Inline image attachments with wp_mail()
-------------------------+-----------------------------
 Reporter:  jesin        |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Mail         |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 To insert inline images in an email the `phpmailer_init` action hook has
 to be used like this.

 {{{
 add_action( 'phpmailer_init', 'embed_images' );

 function embed_images( &$phpmailer ) {
     $phpmailer->AddEmbeddedImage( '/path/to/image1.png', 'image1.png' );
     $phpmailer->AddEmbeddedImage( '/path/to/image2.png', 'image2.png' );
     $phpmailer->AddEmbeddedImage( '/path/to/image3.png', 'image3.png' );
 }
 }}}

 Why not implement this in `wp_mail()` itself?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28059>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list