bbp_get_do_not_reply_address()
Get the “Do Not Reply” email address to use when sending subscription emails.
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
Return
(string)
Source
File: bp-forums/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 ); } return apply_filters( 'bbp_get_do_not_reply_address', 'noreply@' . $sitename ); }
Changelog
Version | Description |
---|---|
bbPress (r5409) | 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.