Filters the wp_mail() arguments.
Parameters
$argsarray- Array of the
wp_mail()arguments.
tostring|string[]Array or comma-separated list of email addresses to send message.subjectstringEmail subject.messagestringMessage contents.headersstring|string[]Additional headers.attachmentsstring|string[]Paths to files to attach.
Source
$atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );
Changelog
| Version | Description |
|---|---|
| 2.2.0 | Introduced. |
modify the recipient of the email