Title: wp_mail_succeeded
Published: February 3, 2022
Last modified: May 20, 2026

---

# do_action( ‘wp_mail_succeeded’, array $mail_data )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/wp_mail_succeeded/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_mail_succeeded/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_mail_succeeded/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_mail_succeeded/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_mail_succeeded/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_mail_succeeded/?output_format=md#wp--skip-link--target)

Fires after PHPMailer has successfully sent an email.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/wp_mail_succeeded/?output_format=md#description)󠁿

The firing of this action does not necessarily mean that the recipient(s) received
the email successfully. It only means that the `send` method above was able to process
the request without any errors.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_mail_succeeded/?output_format=md#parameters)󠁿

 `$mail_data`array

An array containing the email recipient(s), subject, message, headers, attachments,
and embeds.

 * `to` string[]
 * Email addresses to send message.
 * `subject` string
 * Email subject.
 * `message` string
 * Message contents.
 * `headers` string[]
 * Additional headers.
 * `attachments` string[]
 * Paths to files to attach.
 * `embeds` string[]
 * Paths to files to embed.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_mail_succeeded/?output_format=md#source)󠁿

    ```php
    do_action( 'wp_mail_succeeded', $mail_data );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/pluggable.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/pluggable.php#L651)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/pluggable.php#L651-L651)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_mail_succeeded/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_mail()](https://developer.wordpress.org/reference/functions/wp_mail/)`wp-includes/pluggable.php` |

Sends an email, similar to PHP’s mail function.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_mail_succeeded/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.9.0](https://developer.wordpress.org/reference/since/6.9.0/) | The `$embeds` element was added to the `$mail_data` array. | 
| [5.9.0](https://developer.wordpress.org/reference/since/5.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_mail_succeeded%2F)
before being able to contribute a note or feedback.