BP_Email::set_reply_to( string|array|int|WP_User $email_address, string $name = '' )
Set the email’s “reply to” address and name.
Description
Parameters
- $email_address
-
(Required) Either an email address, user ID, WP_User object, or an array containing any combination of the above.
- $name
-
(Optional) If $email_address is a string, this is the recipient's name.
Default value: ''
Return
(BP_Email)
Source
File: bp-core/classes/class-bp-email.php
public function set_reply_to( $email_address, $name = '' ) {
$reply_to = new BP_Email_Recipient( $email_address, $name );
/**
* Filters the new value of the email's "reply to" property.
*
* @since BuddyPress 2.5.0
*
* @param BP_Email_Recipient $reply_to "Reply to" recipient.
* @param string|array|int|WP_User $email_address Either an email address, user ID, WP_User object,
* or an array containing any combination of the above.
* @param string $name Optional. If $email_address is a string, this is the recipient's name.
* @param BP_Email $this Current instance of the email type class.
*/
$this->reply_to = apply_filters( 'bp_email_set_reply_to', $reply_to, $email_address, $name, $this );
return $this;
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 2.5.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.