[wp-trac] [WordPress Trac] #28059: Inline image attachments with wp_mail()
WordPress Trac
noreply at wordpress.org
Sat Jun 21 01:20:04 UTC 2025
#28059: Inline image attachments with wp_mail()
-------------------------------------------------+-------------------------
Reporter: jesin | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Mail | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing needs-unit- | Focuses:
tests has-test-info needs-dev-note |
-------------------------------------------------+-------------------------
Changes (by SirLouen):
* keywords: has-patch needs-testing needs-unit-tests => has-patch needs-
testing needs-unit-tests has-test-info needs-dev-note
Comment:
== Testing Instructions
1. First, you need to set up a working Mail environment:
- You might use some env like Local WP, Laravel Herd, FlyEnv, or the
liking, all come with Mail testing system
- Or if you are using `wordpress-develop` you might try to configure my
[https://github.com/WordPress/wordpress-develop/pull/8555 PR 8555] which
adds Mailhog support
2. Secondly, you need to install some WP plugin (or add some code), to
connect to the email delivery server. You might use some plugins like WP
Mail SMTP and configure with the hostname and port of your Mail testing
service.
3. Once you have the mailing system completely setup, it's time to use my
testing plugin: https://raw.githubusercontent.com/SirLouen/wp-mail-embed-
showcase/refs/tags/1.0.0/wp-mail-embed-showcase.php
- You can check the code and adapt it to your needs, in order to add
whatever extra tests you would like to do.
- By default, it adds a menu called Mail Embed Showcase, which will send
an email with two default embeds: A PNG and an SVG using the filter hook
`wp_mail_embed_args` to specify the SVG file type `image/svg+xml` (not
defaulted by PHPMailer).
4. Finally, if everything is OK, you will receive an email with the two
embedded images showing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28059#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list