WordPress action hook · part of WordPress core
wp_mail_succeeded
A WordPress core action that 58 plugins also fire themselves, running on 1.4M+ sites between them.
“Fires after a successful email is sent using the wp_mail() function.”
How to use wp_mail_succeeded
It's an action: your callback runs at that point and receives 1 argument. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'wp_mail_succeeded', function( $mail_data ) {
// Your code runs here.
}, 10, 1 );Argument names come from FluentSMTP's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
58 plugins that fire wp_mail_succeeded
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
FluentSMTP700,000+ installs
do_action( 'wp_mail_succeeded', $mail_data )app/Functions/helpers.php:833 -
Post SMTP300,000+ installs
do_action( 'wp_mail_succeeded', $atts )Postman/PostmanWpMailBinder.php:152 -
SureMail200,000+ installs
do_action( 'wp_mail_succeeded', $mail_data )inc/emails/default-mail-handler.php:415 -
Mailgun for WordPress70,000+ installs
do_action( 'wp_mail_succeeded', $mail_data )includes/wp-mail-api.php:723 -
SMTP Mailer70,000+ installs
do_action( 'wp_mail_succeeded', $mail_data )main.php:1103 -
ActiveCampaign Postmark for WordPress50,000+ installs
do_action( 'wp_mail_succeeded', array( 'to' => $body['To'], 'subject' => $body['Subject'], 'message' => $body['HtmlBody'] ?? $body['TextBody'], 'headers' => $recognized_headers, 'attachments' => $body['Attachments'] ?? null, ) )wp-mail.php:335 -
Infinity23 (Formerly Tag Manager)20,000+ installs
do_action( 'wp_mail_succeeded', $infinity23_elastic_mail_data )essential/email-smtp/back-end/back-end.php:782 -
Gmail SMTP10,000+ installs
do_action( 'wp_mail_succeeded', $mail_data )main.php:1193 -
Swift SMTP (formerly Welcome Email Editor)7,000+ installs
do_action( 'wp_mail_succeeded', $mail_data )modules/smtp/class-smtp-output.php:234 -
Groundhogg2,000+ installs
do_action( 'wp_mail_succeeded', $mail_data )includes/pluggable.php:556 -
Bit SMTP2,000+ installs
do_action( 'wp_mail_succeeded', $mailData )backend/app/Mail/Dispatch/WpMailBridge.php:677 -
SmartSMTP2,000+ installs
do_action( 'wp_mail_succeeded', $mail_data )includes/Services/Services.php:559 -
Meow Mailer1,000+ installs
do_action( 'wp_mail_succeeded', [ 'to' => $email['to'], 'subject' => $email['subject'], 'message' => $email['message'], 'headers' => $email['headers_raw'], 'attachments' => $email['attachments'], ] )classes/modules/mailer.php:265 -
Infinite Uploads800+ installs
do_action( 'wp_mail_succeeded', $mail_data )inc/InfiniteUploadsWPMail.php:440 -
Resend500+ installs
do_action( 'wp_mail_succeeded', array( 'to' => $body['to'], 'subject' => $body['subject'], 'message' => $body['html'] ?? $body['text'], 'headers' => $headers, 'attachments' => $body['attachments'] ?? null, ) )wp-mail.php:136 -
turboSMTP400+ installs
do_action( 'wp_mail_succeeded', array_merge( $mail_atts, array( 'api_response' => $mail_sent_response ) ) )public/class-turbosmtp-public.php:209 -
aDirectory300+ installs
do_action( 'wp_mail_succeeded', $mail_data )inc/EmailSender.php:408 -
Custom SMTP: Email Deliverability200+ installs
do_action( 'wp_mail_succeeded', $success_data )src/Mail/SesMailer.php:158 -
AIO Tools (All in One Tools)100+ installs
do_action( 'wp_mail_succeeded', $mail_data )modules/smtp/class-aio-mailer.php:770 -
Kaddora MailFlow SMTP40+ installs
do_action( 'wp_mail_succeeded', array( 'to' => $message->to, 'subject' => $message->subject, 'message' => $message->body, 'headers' => $message->headers, 'attachments' => $message->attachments ) )includes/mail/class-kms-delivery-manager.php:149 -
SendForce Mail SMTP Relay30+ installs
do_action( 'wp_mail_succeeded', $atts )includes/class-sendforce-mailer.php:375 -
Authentic Sender20+ installs
do_action( 'wp_mail_succeeded', $atts )includes/class-api-mailer.php:98 -
API Mailer for AWS SES20+ installs
do_action( 'wp_mail_succeeded', $mail_data )src/Mail/Mailer.php:113 -
Kelune CRM10+ installs
do_action( 'wp_mail_succeeded', $mail_data )includes/Services/SiteMailerService.php:101 -
Sendelva10+ installs
do_action( 'wp_mail_succeeded', $atts )sendelva.php:335 -
Lean SMTP10+ installs
do_action( 'wp_mail_succeeded', $mail_data )includes/class-lean-smtp-mailer.php:292 -
PowerSuite Modular Admin Toolkit10+ installs
do_action( 'wp_mail_succeeded', $atts )modules/email-smtp/includes/EmailRouter.php:236 -
TriggerFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail_data )inc/Core/TriggerMailer.php:429 -
Duva MailFewer than 10 installs
do_action( 'wp_mail_succeeded', self::mail_data( $atts ) )includes/class-duva-mail-mailer.php:46 -
eusendFewer than 10 installs
do_action( 'wp_mail_succeeded', $atts )includes/class-eusend-mailer.php:137 -
EnjinMel SMTPFewer than 10 installs
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', ) )enjinmel-smtp.php:507 -
SendFleetFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail_data )includes/class-mailer.php:127 -
Codo MailerFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail_data )src/Mail/Dispatcher.php:157 -
Connector for bluefox.emailFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail_data )modules/mailer/class-mailer.php:137 -
Mersal SMTPFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail_data )includes/class-mersal-smtp-mailer.php:121 -
Frumbik SMTPFewer than 10 installs
do_action( 'wp_mail_succeeded', $wpMailArgs )src/Mail/WpMailOverride.php:261 -
GlobalDev SMTPFewer than 10 installs
do_action( 'wp_mail_succeeded', $atts )includes/class-gds-core.php:219 -
Aluleth SMTPFewer than 10 installs
do_action( 'wp_mail_succeeded', self::mail_data( $atts ) )includes/class-sender.php:202 -
Titanium Mail SMTPFewer than 10 installs
do_action( 'wp_mail_succeeded', $atts )includes/class-tmsmtp-plugin.php:770 -
Beacon Campaign SenderFewer than 10 installs
do_action( 'wp_mail_succeeded', $atts )includes/class-bcsend-smtp.php:259 -
Emercury SMTP MailFewer than 10 installs
do_action( 'wp_mail_succeeded', $atts )src/Core/Mailer.php:229 -
Kelune SMTPFewer than 10 installs
do_action( 'wp_mail_succeeded', $atts )includes/Mailer/Mailer.php:283 -
SMTPing Email Suite: SMTP, Newsletter & Email VerificationFewer than 10 installs
do_action( 'wp_mail_succeeded', $atts )includes/class-smtping-smtp-mailer.php:97 -
LettrFewer than 10 installs
do_action( 'wp_mail_succeeded', array( 'to' => $body['to'], 'subject' => $body['subject'], 'message' => isset( $body['html'] ) ? $body['html'] : ( isset( $body['text'] ) ? $body['text'] : '' ), 'headers' => $headers, 'attachments' => isset( $body['attachments'] ) ? $body['attachments'] : null, ) )wp-mail.php:288 -
PostkeepFewer than 10 installs
do_action( 'wp_mail_succeeded', $atts )includes/smtp-manager/class-smtp-mailer.php:887 -
NoorSMTPFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail_result )src/Modules/GmailApi/GmailApiModule.php:380 -
SMTP SenpaiFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail_data )includes/class-smtp-senpai-mailer.php:228 -
MazeSMTPFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail->toAtts() )app/Mail/DeliveryService.php:462 -
meil.roFewer than 10 installs
do_action( 'wp_mail_succeeded', $atts )includes/class-meil-mailer.php:162 -
MailBridgeAPI Email DeliveryFewer than 10 installs
do_action( 'wp_mail_succeeded', $atts )includes/class-mailer.php:130 -
GhostParseFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail_data )includes/class-mailer.php:55 -
Virtual Solutions Client CRMFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail_data )includes/class-mailer.php:607 -
SolviroaFewer than 10 installs
do_action( 'wp_mail_succeeded', is_array( $atts ) ? $atts : array() )includes/class-cmw-mail-router.php:227 -
Cybexsoft SMTPFewer than 10 installs
do_action( 'wp_mail_succeeded', self::mail_data( $atts ) )includes/class-cybex-smtp-mail-handler.php:359 -
SMTPMaster Email SenderFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail_data )includes/class-smtpmaster-engine.php:353 -
MailKite SMTPFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail_data )src/Mail/Interceptor.php:111 -
Flex SMTPFewer than 10 installs
do_action( 'wp_mail_succeeded', $atts )includes/api-mailer.php:54 -
HiveifyFewer than 10 installs
do_action( 'wp_mail_succeeded', $mail_data ?? [] )hiveify.php:375
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.