Post SMTP icon
Email & Marketing

Post SMTP hooks reference

  • By Saad Iqbal
  • v4.0.3 New
  • Updated

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.

functions.phpyour child theme
// 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

  • Postman/Postman-Configuration/PostmanConfigurationController.php line 496 · used in 6 places
    /**
     * Filters whether to display the legacy wizard or not.
     */
    apply_filters( 'post_smtp_legacy_wizard', true );
  • Postman/Mobile/includes/rest-api/v1/rest-api.php line 244 · used in 3 places
    /**
     * Fires before resending email
     */
    apply_filters( 'post_smtp_resend_attachments', array(), $id );
  • Postman/PostmanEmailLogs.php line 826 · used in 2 places
    /**
     * Fires before viewing logs
     */
    apply_filters( 'post_smtp_before_view_log', $log, $type );
  • Postman/PostmanWpMail.php line 339 · used in 2 places
    /**
     * Filters to send email or not
     */
    apply_filters( 'post_smtp_do_send_email', true );
  • includes/postman-utm.php line 353 · used in 2 places
    /**
     * Filter in-plugin UTM campaign before the URL is built.
     */
    apply_filters( 'post_smtp_utm_campaign', $resolved['campaign'], $resolved['content'], $path );
  • Postman/Extensions/Core/Notifications/PostmanWebhookAlertsNotify.php line 34 · used in 2 places
    /**
     * Filter to validate the webhook URL
     */
    apply_filters( 'post_smtp_validate_webhook_url', true, $webhook_url );
  • Postman/PostmanViewController.php line 308 · used in 2 places
    /**
     * Filter the URL of the Postman SMTP Wizard
     */
    apply_filters( 'post_smtp_wizard_url_page', PostmanConfigurationController::CONFIGURATION_WIZARD_SLUG );
  • Postman/Postman-Email-Health-Report/PostmanEmailReportSending.php line 278 · used in 2 places
    /**
     * Filters the site title to be used in the email subject.
     */
    apply_filters( 'postman_rat_reporting_email_site_title', get_bloginfo( 'name' ) );
  • Postman/Postman-Email-Health-Report/PostmanEmailReportSending.php line 287 · used in 2 places
    /**
     * 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
    Postman/Postman-Mail/PostmanMessage.php line 168 · used in 2 places
    /**
     * Filter the email address to send from.
     */
    apply_filters( 'wp_mail_from', $this->getFromAddress()->getEmail() );
  • Postman/Postman-Mail/PostmanMessage.php line 185 · used in 2 places
    /**
     * Filter the name to associate with the "from" email address.
     */
    apply_filters( 'wp_mail_from_name', $this->getFromAddress()->getName() );
  • Postman/Postman-Email-Log/PostmanEmailLogService.php line 296
    /**
     * Fires after the email log is saved
     */
    do_action( 'post_smtp_after_email_log_saved', $log_id );
  • Postman/PostmanAdminController.php line 410
    /**
     * Fires after resetting pluign
     */
    do_action( 'post_smtp_after_reset_plugin' );
  • Postman/Postman-Email-Log/PostmanEmailLogTable.php line 11
    /**
     * Fires before the logs table.
     */
    do_action( 'post_smtp_before_logs_table' );
  • Postman/PostmanAdminController.php line 383
    /**
     * Fires before resetting pluign
     */
    do_action( 'post_smtp_before_reset_plugin' );
  • Postman/PostmanViewController.php line 523
    /**
     * Fires after the Postman SMTP dashboard configuration.
     */
    do_action( 'post_smtp_dashboard_after_config' );
  • Postman/Postman-Mail/PostmanTransportRegistry.php line 380
    /**
     * Filters Dashobard Notice
     */
    apply_filters( 'post_smtp_dashboard_notice', $message );
  • Postman/Postman-Email-Log/PostmanEmailLogController.php line 126
    /**
     * Filters JS localize
     */
    apply_filters( 'post_smtp_email_logs_localize', $localize );
  • Postman/PostmanOptions.php line 335
    /**
     * 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] );
  • Postman/PostmanOptions.php line 354
    /**
     * Filters the From Name
     */
    apply_filters( 'post_smtp_from_name', $this->options[PostmanOptions::MESSAGE_SENDER_NAME] );
  • Postman/Postman-Email-Log/PostmanEmailQueryLog.php line 64
    /**
     * Filter the query arguments
     */
    apply_filters( 'post_smtp_get_logs_args', $args );
  • Postman/Postman-Email-Log/PostmanEmailQueryLog.php line 118
    /**
     * Filter the query after the table name
     */
    apply_filters( 'post_smtp_get_logs_query_after_table', $this->query, $args );
  • Postman/Postman-Email-Log/PostmanEmailQueryLog.php line 106
    /**
     * Filter the query columns
     */
    apply_filters( 'post_smtp_get_logs_query_cols', $this->columns, $args );
  • Postman/Postman-Mail/Zend-1.12.10/Mail/Transport/Abstract.php line 203
    /**
     * Filter to manage \r\n compalibility issues with some PHP versions
     */
    apply_filters( 'post_smtp_incompatible_php', false );
  • Postman/PostmanWpMail.php line 145
    /**
     * Filter the generated Message-ID value before the header is sent.
     */
    apply_filters( 'post_smtp_message_id', $this->createMessageId() );
  • Postman/Mobile/includes/rest-api/v2/rest-api.php line 157
    /**
     * License Response
     */
    apply_filters( 'post_smtp_mobile_license_response', $response );
  • Postman/Mobile/includes/rest-api/v2/rest-api.php line 144
    /**
     * Validate License
     */
    apply_filters( 'post_smtp_mobile_validate_license', false );
  • Postman/Postman-Configuration/PostmanConfigurationController.php line 842
    /**
     * Fires to load new wizard
     */
    do_action( 'post_smtp_new_wizard' );
  • Postman/Extensions/Core/Notifications/PostmanMailNotify.php line 38
    /**
     * Filters The Notification Emails
     */
    apply_filters( 'post_smtp_notify_email', $notification_emails );
  • Postman/Postman-Mail/Services/PostMark/Handler.php line 74
    /**
     * Filters the content before sending
     */
    apply_filters( 'post_smtp_postmark_content', $content );
  • Postman/PostmanOptions.php line 587
    /**
     * Filters Reply-To
     */
    apply_filters( 'post_smtp_reply_to', $this->options[PostmanOptions::REPLY_TO] );
  • Postman/PostmanWpMail.php line 339
    /**
     * Filters to send email or not
     */
    apply_filters( 'post_smtp_send_email', true );
  • Postman/Postman-Email-Log/PostmanEmailLogService.php line 375
    /**
     * Filter whether to truncate the log
     */
    apply_filters( 'post_smtp_truncate_the_log', true );
  • Postman/Postman-Email-Log/PostmanEmailLogService.php line 285
    /**
     * Filter the email log id
     */
    apply_filters( 'post_smtp_update_email_log_id', '' );
  • includes/postman-utm.php line 112
    /**
     * Filter registered in-plugin UTM placement names.
     */
    apply_filters( 'post_smtp_utm_placements', $placements );
  • includes/postman-utm.php line 328
    /**
     * Filter promo UTM campaign slug.
     */
    apply_filters( 'post_smtp_utm_promo_campaign', $default );
  • Postman/PostmanEmailLogs.php line 621
    /**
     * Fires after deleting logs
     */
    do_action( 'postman_delete_logs_successfully', $args );
  • Postman/Postman-Email-Health-Report/PostmanEmailReportSending.php line 180
    /**
     * Filter to get query from extension
     */
    apply_filters( 'postman_health_count', $query_select );
  • pre_wp_mail

    filter
    Postman/PostmanWpMailBinder.php line 141
    /**
     * Filters whether to preempt sending an email.
     */
    apply_filters( 'pre_wp_mail', null, $atts );
  • Postman/PostmanEmailLogs.php line 539
    /**
     * Filter the row data
     */
    apply_filters( 'ps_email_logs_row', $row );
  • wp_mail

    filter
    Postman/PostmanWpMail.php line 191
    /**
     * Filter the wp_mail() arguments.
     */
    apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );
  • Postman/Postman-Mail/PostmanMessage.php line 202
    /**
     * Filter the default wp_mail() charset.
     */
    apply_filters( 'wp_mail_charset', $this->getCharset() );
  • Postman/Postman-Mail/PostmanMessage.php line 219
    /**
     * Filter the wp_mail() content type.
     */
    apply_filters( 'wp_mail_content_type', $this->getContentType() );
  • Postman/Extensions/Core/Notifications/PostmanNotify.php line 642 · used in 47 places
    apply_filters( 'postman_get_plugin_metadata', null );
  • Postman/Dashboard/includes/rest-api/v1/class-psd-rest-api.php line 241 · used in 7 places
    apply_filters( 'postman_wp_mail_result', null );
  • Postman/Postman-Mail/Zend-1.12.10/Mail.php line 368 · used in 2 places
    apply_filters( 'post_smtp_content_transfer_encoding', $encoding, Postman_Zend_Mime::TYPE_TEXT );
  • Postman/Dashboard/includes/rest-api/v1/class-psd-rest-api.php line 336 · used in 2 places
    apply_filters( 'post_smtp_dashboard_opened_emails_count', 0, array( 'period' => $period, 'current_time' => $current_time, 'filter' => $filter, ) );
  • Postman/Postman-Email-Log/PostmanEmailLogTable.php line 23 · used in 2 places
    do_action( 'post_smtp_email_logs_table_header' );
  • Postman/Postman-Email-Log/PostmanEmailLogService.php line 257 · used in 2 places
    apply_filters( 'post_smtp_log_solution', null, $new_status, $log, $message );
  • Postman/Extensions/Core/Notifications/PostmanNotify.php line 338 · used in 2 places
    apply_filters( 'post_smtp_notifier', $notifyer, $notification_service );
  • Postman/Phpmailer/PostsmtpMailer.php line 167 · used in 2 places
    do_action( 'post_smtp_on_failed', $log, $postmanMessage, $this->transcript, $transport, $exc->getMessage() );
  • Postman/Phpmailer/PostsmtpMailer.php line 153 · used in 2 places
    do_action( 'post_smtp_on_success', $log, $postmanMessage, $this->transcript, $transport );
  • Postman/Postman-Controller/PostmanDashboardWidgetController.php line 239 · used in 2 places
    apply_filters( 'print_postman_status', null );
  • Postman/Dashboard/NewDashboard.php line 65
    apply_filters( 'active_plugins', get_option( 'active_plugins' ) );
  • Postman/Extensions/MainWP-Child/includes/classes/class-psmwp-request.php line 73
    apply_filters( 'mainwp_child_create_action_nonce', false, 'post-smtp-send-mail' );
  • Postman/Extensions/MainWP-Child/includes/classes/class-psmwp-request.php line 24
    apply_filters( 'mainwp_child_get_encrypted_option', false, 'mainwp_child_server', false );
  • Postman/Extensions/MainWP-Child/includes/classes/class-psmwp-request.php line 74
    apply_filters( 'mainwp_child_get_ping_nonce', '' );
  • Postman/Mobile/includes/functions.php line 45
    apply_filters( 'mainwp_extension_enabled_check', __FILE__ );
  • Postman/Mobile/includes/functions.php line 47
    apply_filters( 'mainwp_getsites', __FILE__, $child_key );
  • Postman/PostmanViewController.php line 226
    apply_filters( 'post_smtp__new_dashboard', __return_false() );
  • Postman/PostmanViewController.php line 227
    do_action( 'post_smtp__new_dashboard_content' );
  • Postman/Postman-Configuration/PostmanConfigurationController.php line 234
    apply_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 ... );
  • Postman/Postman.php line 144
    apply_filters( 'post_smtp_declare_wp_mail', true );
  • Postman/PostmanOptions.php line 205
    apply_filters( 'post_smtp_default_site_option', 1 );
  • Postman/PostmanSMTPConflictManager.php line 479
    apply_filters( 'post_smtp_enable_conflict_detection', true );
  • Postman/Postman-Mail/Services/SendGrid/Handler.php line 49
    apply_filters( 'post_smtp_enable_sendgrid_eu', false );
  • Postman/PostmanViewController.php line 417
    do_action( 'post_smtp_extension_reset_link' );
  • Postman/PostmanAdminController.php line 135
    do_action( 'post_smtp_handle_oauth', $this->messageHandler );
  • postman-smtp.php line 230
    do_action( 'post_smtp_init' );
  • Postman/Postman-Email-Log/PostmanEmailLogService.php line 253
    apply_filters( 'post_smtp_log_status', $new_status, $log, $message );
  • Postman/PostmanReferralLinks.php line 24
    apply_filters( 'post_smtp_maileroo_referral_url', self::MAILEROO );
  • Postman/Extensions/Core/Notifications/PostmanNotify.php line 437
    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' ), ) );
  • Postman/Extensions/Core/Notifications/PostmanNotify.php line 69
    do_action( 'post_smtp_notification_settings' );
  • Postman/PostmanViewController.php line 363
    apply_filters( 'post_smtp_oauth_actions', $oauth_link );
  • Postman/Wizard/NewWizard.php line 697
    apply_filters( 'post_smtp_office365_tenant_id', 'common' );
  • Postman/PostmanReferralLinks.php line 20
    apply_filters( 'post_smtp_postmark_referral_url', self::POSTMARK );
  • Postman/Mobile/mobile.php line 142
    apply_filters( 'post_smtp_qrcode_class_candidates', $candidates );
  • Postman/PostmanInputSanitizer.php line 112
    apply_filters( 'post_smtp_sanitize', $new_input, $input, $this );
  • Postman/Postman-Mail/Services/SendGrid/Handler.php line 53
    apply_filters( 'post_smtp_sendgrid_base_url', $this->base_url, $region );
  • Postman/Postman-Configuration/PostmanRegisterConfigurationSettings.php line 196
    do_action( 'post_smtp_settings_fields' );
  • Postman/Postman-Configuration/PostmanConfigurationController.php line 479
    do_action( 'post_smtp_settings_menu' );
  • Postman/Postman-Configuration/PostmanConfigurationController.php line 335
    do_action( 'post_smtp_settings_sections' );
  • Postman/Extensions/Core/Notifications/PostmanNotify.php line 366
    apply_filters( 'post_smtp_should_send_failure_notification', true, $postmanMessage );
  • Postman/PostmanReferralLinks.php line 28
    apply_filters( 'post_smtp_smtpcom_referral_url', self::SMTPCOM );
  • Postman/Wizard/NewWizard.php line 2146
    do_action( 'post_smtp_wizard_configuration_saved' );
  • Postman/Postman-Controller/PostmanAdminPointer.php line 53
    apply_filters( "postman_admin_pointers-{$screen_id}", array () );
  • Postman/Postman-Email-Log/PostmanEmailLogLegacy.php line 29
    apply_filters( 'postman_log_per_page', array( 10, 15, 25, 50, 75, 100 ) );
  • Postman/Postman-Mail/PostmanSparkPostMailEngine.php line 212
    apply_filters( 'postman_sparkpost_click_tracking', false, $message );
  • Postman/Postman-Mail/PostmanSparkPostMailEngine.php line 211
    apply_filters( 'postman_sparkpost_open_tracking', false, $message );
  • Postman/Postman-Mail/PostmanSparkPostMailEngine.php line 215
    apply_filters( 'postman_sparkpost_transmission_body', $body, $message );
  • Postman/PostmanWpMail.php line 308
    apply_filters( 'postman_test_email', false );
  • Postman/Postman-Send-Test-Email/PostmanSendTestEmailController.php line 353
    apply_filters( 'postman_test_email_args', compact( 'email', 'subject', 'message', 'header' ) );
  • Postman/Postman-Diagnostic-Test/PostmanDiagnosticTestController.php line 301
    apply_filters( 'postman_wp_mail_bind_status', null );
  • Postman/Postman-Mail/PostmanTransportRegistry.php line 107
    do_action( 'postsmtp_register_transport', $this );
  • ps_fs_loaded

    action
    postman-smtp.php line 70
    do_action( 'ps_fs_loaded' );
  • Postman/PostmanWpMail.php line 411
    do_action( 'wp_mail_failed', new WP_Error( 'wp_mail_failed', $e->getMessage(), $mail_error_data ) );
  • Postman/PostmanWpMailBinder.php line 152
    do_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: