apply_filters( 'pre_wp_mail', null|bool $return, array $atts )

Filters whether to preempt sending an email.


Description Description

Returning a non-null value will short-circuit wp_mail(), returning that value instead. A boolean return value should be used to indicate whether the email was successfully sent.


Top ↑

Parameters Parameters

$return

(null|bool) Short-circuit return value.

$atts

(array) Array of the wp_mail() arguments.

  • 'to'
    (string|string[]) Array or comma-separated list of email addresses to send message.
  • 'subject'
    (string) Email subject.
  • 'message'
    (string) Message contents.
  • 'headers'
    (string|string[]) Additional headers.
  • 'attachments'
    (string|string[]) Paths to files to attach.


Top ↑

Source Source

File: wp-includes/pluggable.php

View on Trac



Top ↑

Changelog Changelog

Changelog
Version Description
5.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

Top ↑

You must log in before being able to contribute a note or feedback.