bbp_get_do_not_reply_address

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

Description

(string) bbp_get_do_not_reply_address(); 

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.

Returns (string)


Usage

  1. if ( !function_exists( 'bbp_get_do_not_reply_address' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/common/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_get_do_not_reply_address(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/common/functions.php  
  1. function bbp_get_do_not_reply_address() { 
  2. $sitename = strtolower( $_SERVER['SERVER_NAME'] ); 
  3. if ( substr( $sitename, 0, 4 ) === 'www.' ) { 
  4. $sitename = substr( $sitename, 4 ); 
  5. return apply_filters( 'bbp_get_do_not_reply_address', 'noreply@' . $sitename );