Skip to:
Content
Pages
Categories
Search
Top
Bottom

New topic emails bug on sublevel domains

Viewing 3 replies - 1 through 3 (of 3 total)

  • Robkk
    Moderator

    @robkk

    Sorry for the late reply, I see you also made a trac ticket so thanks for reported an issue.


    Brandon Allen
    Participant

    @thebrandonallen

    The unit tests are passing, so my guess is that it’s a problem with a plugin, or (less likely) your PHP setup. The $_SERVER['SERVER_NAME'] doesn’t include the protocol (http:// or https:// in most cases), so that shouldn’t be an issue.

    My guess is that there is some other plugin that’s filtering bbp_get_do_not_reply_address incorrectly. Maybe even some code in your theme’s functions.php file. Could provide a list of the plugins you’re using. Specifically, bbPress or email related plugins?


    skyynet
    Participant

    @skyynet

    Since installing 2.5.10 of the BBPress Plugin the corresponding function improved a bit. The function which creates the noreply sender sits in includes/common/functions.php and reads

    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 );
    }

    In my case the domain is something like subdomain.domain.de

    The above function creates the noreply address noreply@subdomain.domain.de
    Correct would be (in my case) noreply@subdomain.de

    IMHO the function could create the sender by parsing the $sitename from right to left (TLD DOT DOMAIN until DOT or //). I was too lazy and just added my specific case

    function bbp_get_do_not_reply_address() {
    	$sitename = strtolower( $_SERVER['SERVER_NAME'] );
    	if ( substr( $sitename, 0, 4 ) === 'www.' ) { $sitename = substr( $sitename, 4 ); }
    	else if ( substr( $sitename, 0, 10 ) === 'subdomain.' ) { $sitename = substr( $sitename, 10 );}
    	return apply_filters( 'bbp_get_do_not_reply_address', 'noreply@' . $sitename );
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar