Post SMTP 4.0.3 has 23 actions and 74 filters, read directly from its source code on Nov 17, 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 Post SMTP fires an action
add_action( 'post_smtp_after_email_log_saved', function( $log_id ) {
// Your code runs here.
}, 10, 1 );
// Change a value Post SMTP is about to use
add_filter( 'post_smtp_legacy_wizard', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );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
-
post_smtp_legacy_wizard
filter/** * Filters whether to display the legacy wizard or not. */ apply_filters( 'post_smtp_legacy_wizard', true ); -
post_smtp_resend_attachments
filter/** * Fires before resending email */ apply_filters( 'post_smtp_resend_attachments', array(), $id ); -
post_smtp_before_view_log
filter/** * Fires before viewing logs */ apply_filters( 'post_smtp_before_view_log', $log, $type ); -
post_smtp_do_send_email
filter/** * Filters to send email or not */ apply_filters( 'post_smtp_do_send_email', true ); -
post_smtp_utm_campaign
filter/** * Filter in-plugin UTM campaign before the URL is built. */ apply_filters( 'post_smtp_utm_campaign', $resolved['campaign'], $resolved['content'], $path ); -
/** * Filter to validate the webhook URL */ apply_filters( 'post_smtp_validate_webhook_url', true, $webhook_url ); -
post_smtp_wizard_url_page
filter/** * Filter the URL of the Postman SMTP Wizard */ apply_filters( 'post_smtp_wizard_url_page', PostmanConfigurationController::CONFIGURATION_WIZARD_SLUG ); -
/** * Filters the site title to be used in the email subject. */ apply_filters( 'postman_rat_reporting_email_site_title', get_bloginfo( 'name' ) ); -
/** * Filters the email address to which the report is sent. */ apply_filters( 'postman_rat_reporting_email_to', get_option( 'admin_email' ) ); -
wp_mail_from
filter/** * Filter the email address to send from. */ apply_filters( 'wp_mail_from', $this->getFromAddress()->getEmail() ); -
wp_mail_from_name
filter/** * Filter the name to associate with the "from" email address. */ apply_filters( 'wp_mail_from_name', $this->getFromAddress()->getName() ); -
/** * Fires after the email log is saved */ do_action( 'post_smtp_after_email_log_saved', $log_id ); -
post_smtp_after_reset_plugin
action/** * Fires after resetting pluign */ do_action( 'post_smtp_after_reset_plugin' ); -
post_smtp_before_logs_table
action/** * Fires before the logs table. */ do_action( 'post_smtp_before_logs_table' ); -
/** * Fires before resetting pluign */ do_action( 'post_smtp_before_reset_plugin' ); -
/** * Fires after the Postman SMTP dashboard configuration. */ do_action( 'post_smtp_dashboard_after_config' ); -
post_smtp_dashboard_notice
filter/** * Filters Dashobard Notice */ apply_filters( 'post_smtp_dashboard_notice', $message ); -
/** * Filters JS localize */ apply_filters( 'post_smtp_email_logs_localize', $localize ); -
post_smtp_from_email_address
filter/** * Filters the From Email Address | This address, like the letterhead printed * on a letter, identifies the sender to the recipient. Change this when you * are sending on behalf of someone else, for example to use Google's Send Mail * As feature. Other plugins, especially Contact Forms, may override this field * to be your visitor's address. */ apply_filters( 'post_smtp_from_email_address', $this->options[PostmanOptions::MESSAGE_SENDER_EMAIL] ); -
post_smtp_from_name
filter/** * Filters the From Name */ apply_filters( 'post_smtp_from_name', $this->options[PostmanOptions::MESSAGE_SENDER_NAME] ); -
post_smtp_get_logs_args
filter/** * Filter the query arguments */ apply_filters( 'post_smtp_get_logs_args', $args ); -
/** * Filter the query after the table name */ apply_filters( 'post_smtp_get_logs_query_after_table', $this->query, $args ); -
/** * Filter the query columns */ apply_filters( 'post_smtp_get_logs_query_cols', $this->columns, $args ); -
post_smtp_incompatible_php
filter/** * Filter to manage \r\n compalibility issues with some PHP versions */ apply_filters( 'post_smtp_incompatible_php', false ); -
post_smtp_message_id
filter/** * Filter the generated Message-ID value before the header is sent. */ apply_filters( 'post_smtp_message_id', $this->createMessageId() ); -
/** * License Response */ apply_filters( 'post_smtp_mobile_license_response', $response ); -
/** * Validate License */ apply_filters( 'post_smtp_mobile_validate_license', false ); -
post_smtp_new_wizard
action/** * Fires to load new wizard */ do_action( 'post_smtp_new_wizard' ); -
post_smtp_notify_email
filter/** * Filters The Notification Emails */ apply_filters( 'post_smtp_notify_email', $notification_emails ); -
post_smtp_postmark_content
filter/** * Filters the content before sending */ apply_filters( 'post_smtp_postmark_content', $content ); -
post_smtp_reply_to
filter/** * Filters Reply-To */ apply_filters( 'post_smtp_reply_to', $this->options[PostmanOptions::REPLY_TO] ); -
post_smtp_send_email
filter/** * Filters to send email or not */ apply_filters( 'post_smtp_send_email', true ); -
post_smtp_truncate_the_log
filter/** * Filter whether to truncate the log */ apply_filters( 'post_smtp_truncate_the_log', true ); -
/** * Filter the email log id */ apply_filters( 'post_smtp_update_email_log_id', '' ); -
post_smtp_utm_placements
filter/** * Filter registered in-plugin UTM placement names. */ apply_filters( 'post_smtp_utm_placements', $placements ); -
post_smtp_utm_promo_campaign
filter/** * Filter promo UTM campaign slug. */ apply_filters( 'post_smtp_utm_promo_campaign', $default ); -
/** * Fires after deleting logs */ do_action( 'postman_delete_logs_successfully', $args ); -
postman_health_count
filter/** * Filter to get query from extension */ apply_filters( 'postman_health_count', $query_select ); -
pre_wp_mail
filter/** * Filters whether to preempt sending an email. */ apply_filters( 'pre_wp_mail', null, $atts ); -
ps_email_logs_row
filter/** * Filter the row data */ apply_filters( 'ps_email_logs_row', $row ); -
wp_mail
filter/** * Filter the wp_mail() arguments. */ apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ); -
wp_mail_charset
filter/** * Filter the default wp_mail() charset. */ apply_filters( 'wp_mail_charset', $this->getCharset() ); -
wp_mail_content_type
filter/** * Filter the wp_mail() content type. */ apply_filters( 'wp_mail_content_type', $this->getContentType() ); -
postman_get_plugin_metadata
filterapply_filters( 'postman_get_plugin_metadata', null ); -
postman_wp_mail_result
filterapply_filters( 'postman_wp_mail_result', null ); -
apply_filters( 'post_smtp_content_transfer_encoding', $encoding, Postman_Zend_Mime::TYPE_TEXT ); -
apply_filters( 'post_smtp_dashboard_opened_emails_count', 0, array( 'period' => $period, 'current_time' => $current_time, 'filter' => $filter, ) ); -
do_action( 'post_smtp_email_logs_table_header' ); -
post_smtp_log_solution
filterapply_filters( 'post_smtp_log_solution', null, $new_status, $log, $message ); -
post_smtp_notifier
filterapply_filters( 'post_smtp_notifier', $notifyer, $notification_service ); -
post_smtp_on_failed
actiondo_action( 'post_smtp_on_failed', $log, $postmanMessage, $this->transcript, $transport, $exc->getMessage() ); -
post_smtp_on_success
actiondo_action( 'post_smtp_on_success', $log, $postmanMessage, $this->transcript, $transport ); -
print_postman_status
filterapply_filters( 'print_postman_status', null ); -
active_plugins
filterapply_filters( 'active_plugins', get_option( 'active_plugins' ) ); -
apply_filters( 'mainwp_child_create_action_nonce', false, 'post-smtp-send-mail' ); -
apply_filters( 'mainwp_child_get_encrypted_option', false, 'mainwp_child_server', false ); -
mainwp_child_get_ping_nonce
filterapply_filters( 'mainwp_child_get_ping_nonce', '' ); -
apply_filters( 'mainwp_extension_enabled_check', __FILE__ ); -
mainwp_getsites
filterapply_filters( 'mainwp_getsites', __FILE__, $child_key ); -
post_smtp__new_dashboard
filterapply_filters( 'post_smtp__new_dashboard', __return_false() ); -
do_action( 'post_smtp__new_dashboard_content' ); -
post_smtp_admin_tabs
filterapply_filters( 'post_smtp_admin_tabs', array( 'connections_config' => sprintf( '<span class="dashicons dashicons-networking"></span> %s', __( 'Connections', 'post-smtp' ) ), 'fallback' => sprintf( '<span class="dashicons dashicons-backup"></span> %s', __( 'Fallback', 'post-smtp' ) ), 'message_config' => sprintf( '<span class="dashicons dashicons-email"></span> %s', __( 'Message', 'post-smtp' ) ), 'logging_config' => sprintf( '<span ... ); -
post_smtp_declare_wp_mail
filterapply_filters( 'post_smtp_declare_wp_mail', true ); -
apply_filters( 'post_smtp_default_site_option', 1 ); -
apply_filters( 'post_smtp_enable_conflict_detection', true ); -
post_smtp_enable_sendgrid_eu
filterapply_filters( 'post_smtp_enable_sendgrid_eu', false ); -
do_action( 'post_smtp_extension_reset_link' ); -
post_smtp_handle_oauth
actiondo_action( 'post_smtp_handle_oauth', $this->messageHandler ); -
post_smtp_init
actiondo_action( 'post_smtp_init' ); -
post_smtp_log_status
filterapply_filters( 'post_smtp_log_status', $new_status, $log, $message ); -
apply_filters( 'post_smtp_maileroo_referral_url', self::MAILEROO ); -
apply_filters( 'post_smtp_notification_service', array( 'none' => __( 'None', 'post-smtp' ), 'default' => __( 'Admin Email', 'post-smtp' ), 'slack' => __( 'Slack', 'post-smtp' ), 'pushover' => __( 'Pushover', 'post-smtp' ), 'webhook_alerts' => __( 'Webhook Alerts', 'post-smtp' ), ) ); -
do_action( 'post_smtp_notification_settings' ); -
post_smtp_oauth_actions
filterapply_filters( 'post_smtp_oauth_actions', $oauth_link ); -
apply_filters( 'post_smtp_office365_tenant_id', 'common' ); -
apply_filters( 'post_smtp_postmark_referral_url', self::POSTMARK ); -
apply_filters( 'post_smtp_qrcode_class_candidates', $candidates ); -
post_smtp_sanitize
filterapply_filters( 'post_smtp_sanitize', $new_input, $input, $this ); -
post_smtp_sendgrid_base_url
filterapply_filters( 'post_smtp_sendgrid_base_url', $this->base_url, $region ); -
post_smtp_settings_fields
actiondo_action( 'post_smtp_settings_fields' ); -
post_smtp_settings_sections
actiondo_action( 'post_smtp_settings_sections' ); -
apply_filters( 'post_smtp_should_send_failure_notification', true, $postmanMessage ); -
apply_filters( 'post_smtp_smtpcom_referral_url', self::SMTPCOM ); -
do_action( 'post_smtp_wizard_configuration_saved' ); -
apply_filters( "postman_admin_pointers-{$screen_id}", array () ); -
postman_log_per_page
filterapply_filters( 'postman_log_per_page', array( 10, 15, 25, 50, 75, 100 ) ); -
apply_filters( 'postman_sparkpost_click_tracking', false, $message ); -
apply_filters( 'postman_sparkpost_open_tracking', false, $message ); -
apply_filters( 'postman_sparkpost_transmission_body', $body, $message ); -
postman_test_email
filterapply_filters( 'postman_test_email', false ); -
postman_test_email_args
filterapply_filters( 'postman_test_email_args', compact( 'email', 'subject', 'message', 'header' ) ); -
postman_wp_mail_bind_status
filterapply_filters( 'postman_wp_mail_bind_status', null ); -
postsmtp_register_transport
actiondo_action( 'postsmtp_register_transport', $this ); -
ps_fs_loaded
actiondo_action( 'ps_fs_loaded' ); -
wp_mail_failed
actiondo_action( 'wp_mail_failed', new WP_Error( 'wp_mail_failed', $e->getMessage(), $mail_error_data ) ); -
wp_mail_succeeded
actiondo_action( 'wp_mail_succeeded', $atts );
Generated from Post SMTP's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: