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

WordPress Trac noreply at wordpress.org
Mon Sep 1 04:02:40 UTC 2025


#28059: Inline image attachments with wp_mail()
-------------------------------------------------+-------------------------
 Reporter:  jesin                                |       Owner:  SirLouen
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.9
Component:  Mail                                 |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-test-info has-unit-    |     Focuses:
  tests add-to-field-guide                       |
-------------------------------------------------+-------------------------
Changes (by TimothyBlynJacobs):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"60698" 60698]:
 {{{
 #!CommitTicketReference repository="" revision="60698"
 Mail: Support inline attachments.

 MIME allows for referencing included attachments by their `Content-ID`
 header using the `cid` URL scheme. This can be used to embed images inline
 to the HTML message. For example, `<img src="cid:logo">`, will display the
 contents of message part with the `Content-Id: <logo>` header.

 The `wp_mail()` function now supports including inline attachments through
 a new `$embeds` parameter. It accepts a map of `Content-ID` values to file
 paths. The `wp_mail_embed_args` filter can be used to customize the
 resulting `PHPMailer::addEmbeddedImage` method call.

 Props jesin, swissspidy, chrisvendiadvertisingcom, SirLouen, mukesh27,
 yashjawale, iamadisingh.
 Fixes #28059.
 }}}

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


More information about the wp-trac mailing list