EnjinMel SMTP 0.2.5 has 4 actions and 8 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when EnjinMel SMTP fires an action
add_action( 'enjinmel_smtp_before_send', function( $normalized, $payload ) {
// Your code runs here.
}, 10, 2 );
// Change a value EnjinMel SMTP is about to use
add_filter( 'enjinmel_smtp_log_entry', function( $entry, $status, $to_emails, $subject, $error_message ) {
// Change $entry here.
return $entry;
}, 10, 5 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Fires immediately before the EnjinMel REST request is dispatched. */ do_action( 'enjinmel_smtp_before_send', $normalized, $payload ); -
/** * Filter a log entry prior to database insert. */ apply_filters( 'enjinmel_smtp_log_entry', $entry, $status, $to_emails, $subject, $error_message ); -
/** * Allow last-minute mutation of the outbound payload before submission. */ apply_filters( 'enjinmel_smtp_payload', $payload, $normalized, $settings ); -
/** * Filter whether to purge log tables on uninstall. */ apply_filters( 'enjinmel_smtp_purge_logs_on_uninstall', $enjinmel_smtp_purge ); -
/** * Filter the request arguments prior to dispatch. */ apply_filters( 'enjinmel_smtp_request_args', $request_args, $payload, $normalized, $settings ); -
/** * Mirror core behaviour for failed mail to keep downstream hooks consistent. */ do_action( 'wp_mail_failed', $error ); -
/** * Mirror core behaviour for successful mail sends. */ do_action( 'wp_mail_succeeded', array( 'to' => $args['to'], 'subject' => $args['subject'], 'message' => $args['message'], 'headers' => $args['headers'], 'attachments' => $args['attachments'], 'transport' => 'enjinmel_rest', 'legacy_transport' => 'enginemail_rest', ) ); -
do_action( 'enjinmel_smtp_after_send', $normalized, $payload, $result ); -
apply_filters( 'enjinmel_smtp_request_timeout', 15, $normalized, $payload, $settings ); -
apply_filters( 'enjinmel_smtp_retention_days', 90 ); -
apply_filters( 'enjinmel_smtp_retention_max_rows', 10000 ); -
apply_filters( 'wp_mail_content_type', 'text/plain' );
Generated from EnjinMel SMTP's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: