| 开发者 | Wardee |
|---|---|
| 更新时间 | 2026年10月18日 23:22 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GNU General Public License v3.0 |
| 版权网址: | 版权信息 |
wp_mail_catcher_mail_success is triggered when a message is sent and logged successfully. It has a single argument that is an array containing the logid related to the id in the mail_catcher_logs MySQL tabletime relative, readable time to when the log was savedemail_to the email address(es) that the message was sent tosubject the subject line of the messagemessage the contents of the messagestatus an integer depicting if the message was sent successfully or not (1 = sent successfully. 0 = sending failed)error the error that occurred - if anybacktrace_segment a json_encoded object that shows which file and line the mail was initially triggered fromattachments a list of any attachments that were sent along with the emailadditional_headers a list of any headers that were sentattachment_file_paths a list of the location of any attachments that were senttimestamp a unix timestamp of when the email was sentis_html a boolean, that will be true if the message is a html email and false if notemail_from the from value of the emailwp_mail_catcher_mail_failed is triggered when a message failed to send and logged successfully. It has a single argument that is an array containing the log (same as the arguments for wp_mail_catcher_mail_success)wp_mail_catcher_deletion_intervals is a filter that should return an array where each key is an amount of time in seconds, and the value is the label. Used to determine when a message has expired and should be deletedwp_mail_catcher_before_success_log_save is a filter that is called just before a successful log is saved. It has a single argument that is the transformed log that will be saved - use this to alter the log before it's saved. Returning false will stop the log from being saved. Also note that this is fired even when an email has errored, because all logs are initially saved as "successful" before being possibly updated with an error (if applicable). This is because of the way the wp_mail and wp_mail_failed are implemented in WordPress.time a unix timestamp of when the email was sentemail_to the email address(es) that the message was sent tosubject the subject line of the messagemessage the contents of the messagebacktrace_segment an array that shows which file and line the mail was initially triggered fromwp_mail_catcher_before_error_log_savetime a unix timestamp of when the email was sentemail_to the email address(es) that the message was sent tosubject the subject line of the messagemessage the contents of the messagebacktrace_segment an array that shows which file and line the mail was initially triggered fromerror the error that occurredwp_mail_catcher_redact is a filter that is called on the subject and message of a log, both before it's saved and before it's displayed - use this to remove sensitive content (e.g. tokens or links) from the logs. It has two arguments, the content being redacted and the name of the field (subject or message), and should return the redacted content. By default URLs containing action=rp or key= (such as password reset links) are replaced with [redacted], this can be turned off in the settings screen. Note that resending a log sends the redacted contentYup, completely 100% free, no premium add-ons or anything like that.
Yes, there are no adverts/annoying messages asking you to "upgrade to pro" or anything similar, 100% of the features are available.
Anything that doesn't unhook the native wp_mail function is supported, this includes but not limited to:
Great! Please leave a note in our (GitHub tracker)
wp_mail_catcher_redact filter to redact the subject and message of logs before they are saved and displayedaction=rp or key= (such as password reset links) are now redacted by default, this can be turned off in the settingsWpMailCatcher to wp-mail-catcher, custom translation files will need renamingwp_mail_catcher_before_success_log_save, it now returns the unaltered mailwp_mail_catcher_before_success_log_savewp_mail_catcher_before_error_log_savewp_mail_catcher_mail_success and wp_mail_catcher_mail_failed