BP_Email::set_reply_to( string|array|int|WP_User $email_address, string $name = '' )

Set the email’s “reply to” address and name.


Description Description


Parameters Parameters

$email_address

(Required) Either a 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: ''


Top ↑

Return Return

(BP_Email)


Top ↑

Source Source

File: bp-core/classes/class-bp-email.php

	public function set_reply_to( $email_address, $name = '' ) {
		$reply_to = new BP_Email_Sender();

		$reply_to->set_address( $email_address );
		$reply_to->set_name( $name );

		/**
		 * Filters the new value of the email's "reply to" property.
		 *
		 * @since 2.5.0
		 *
		 * @param BP_Email_Recipient $reply_to "Reply to" recipient.
		 * @param string|array|int|WP_User $email_address Either a 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;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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