bbp_get_do_not_reply_address()

Get the “Do Not Reply” email address to use when sending subscription emails.


Description Description

We make some educated guesses here based on the home URL. Filters are available to customize this address further. In the future, we may consider using admin_email instead, though this is not normally publicized.

We use $_SERVER['SERVER_NAME'] here to mimic similar functionality in WordPress core. Previously, we used get_home_url() to use already validated user input, but it was causing issues in some installations.

See also See also


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/common/functions.php

function bbp_get_do_not_reply_address() {
	$sitename = strtolower( $_SERVER['SERVER_NAME'] );
	if ( substr( $sitename, 0, 4 ) === 'www.' ) {
		$sitename = substr( $sitename, 4 );
	}

	// Filter & return
	return apply_filters( 'bbp_get_do_not_reply_address', 'noreply@' . $sitename );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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