Opened 5 weeks ago
Last modified 27 hours ago
#63135 new enhancement
Testing and Debugging WP_Mail related topics
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 6.9 | Priority: | normal |
Severity: | minor | Version: | trunk |
Component: | Build/Test Tools | Keywords: | has-patch needs-testing has-testing-info |
Focuses: | Cc: |
Description
How do you test and debug things related to WP_Mail
with wordpress_develop
?
Unless I'm missing something in the code, I think that having an optional runnable Mailhog instance could be pretty neat for testing and debugging purposes.
Maybe there are some other proposals or ideas that I would like to know, but meanwhile I will be uploading a patch with Mailhog idea.
Change History (4)
This ticket was mentioned in Slack in #core-test by sirlouen. View the logs.
5 weeks ago
This ticket was mentioned in PR #8555 on WordPress/wordpress-develop by @SirLouen.
5 weeks ago
#2
- Keywords has-patch added
Note: See
TracTickets for help on using
tickets.
Adding support for a mailhog container on demand with the env variable:
LOCAL_MAILHOG
Patch Testing instructions:
LOCAL_MAILHOG=false
toLOCAL_MAILHOG=true
in your.env
filenpm run env:start
A) Go to http://localhost:8025/
B) You can run in your wordpress-develop container
And it might result in something like:
C) You can do further tests, like sending an email with a plugin that uses the local mailhog hostname
For example this one: https://github.com/SirLouen/amazon-s3-email-testing/archive/refs/tags/1.0.0.zip
Trac ticket: https://core.trac.wordpress.org/ticket/63135