Skip to:

Opened 6 years ago

Closed 5 years ago

#2822 closed defect (fixed)

email notification bug on sublevel domains

Reported by: skyynet Owned by: thebrandonallen
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.8
Component: API - Subscriptions Keywords: has-patch
Cc: robkk17@…


Ever since I installed BBpress I have this bug: Everytime an email is about to be sent I get an error message from my server like <>… Deferred: Connection refused by

You might have seen that the subdomain is being put into the email sender and the first letter of it is killed. In my opinion the sender should be instead of (I had to change the AT sign to "AT" a otherwise the domain is shown as ... in this ticket system.)

wp: 4.2.2
bbpress: 2.5.7

Attachments (1)

2822.01.tests.patch (1.3 KB) - added by thebrandonallen 5 years ago.

Download all attachments as: .zip

Change History (10)

#1 @Robkk
6 years ago

  • Cc robkk17@… added

#2 @thebrandonallen
5 years ago

  • Keywords reporter-feedback added


Are you still seeing this issue? I can't seem to reproduce this. What version of PHP are you running? Who is your host? Are you running any other plugins that deal with email?

#3 @skyynet
5 years ago

  • Version set to 2.5.8

Hi @thebrandonallen,

Yes, I still experience this problem. I'm currently running Wordpress 4.3.1 with BBpress 2.5.8-5815 an "bbPress auto subscribe for new topics and replies" plugin 1.0.
My PHP Version is 5.6.

I think the problem is caused by me using a subleveldomain. I assume when I use it on the messages are sent from noreply@…. In my case the messages for (lets say) are sent from noreply@… which causes the error.

Maybe you can lead me to the class or module that figures out the sender based on the domain. There seems to be an error in that routine.

#4 @thebrandonallen
5 years ago

  • Keywords has-unit-tests added

The code, if you're interested in looking, is in the bbp_get_do_not_reply_address() function. However, the code is solid. I've written a unit test to check it, which I will attach to this ticket. The test passes on both single and multisite WP from 3.8 to trunk (what will soon be 4.4), and on PHP 5.2 to PHP 7.0.

Are you running any other plugins that deal with email? Maybe something in your theme's functions.php?

Also, because the test is passing, I will likely close this ticket move this conversation back into the support forums pretty soon unless we come across what is causing this quickly.

#5 @skyynet
5 years ago

  • Owner set to thebrandonallen

Sorry for the long delay. You led me to the position where I was able to fix the problem for my site. I don't know why it doesn't occur on other sites.

My site is named like and always accessed via SSL.

When I extend functions.php to

function bbp_get_do_not_reply_address() {
        $sitename = strtolower( $_SERVER['SERVER_NAME'] );
        if ( substr( $sitename, 0, 4 ) === 'www.' ) {
                $sitename = substr( $sitename, 4 );
        // begin workaround subdomain always sent as
        elseif ( substr( $sitename, 0, 7 ) === 'schule.' ) {
                $sitename = substr( $sitename, 7 );
        // end workaround
        return apply_filters( 'bbp_get_do_not_reply_address', 'noreply@' . $sitename );

it works. Is it somehow possible that the problem is caused by accessing the site via ssl? Thus there is one character more in than in
Just guessing...


#6 @thebrandonallen
5 years ago

  • Component changed from Component - Forums to API - Subscriptions
  • Keywords has-patch added; reporter-feedback has-unit-tests removed
  • Milestone changed from Awaiting Review to 2.6

Moving this to 2.6, so the test can be committed. Then, I suggest we close.

#7 @skyynet
5 years ago

Did you find anything to address my problem or does it only occur on my system?
If there is anything I should test just drop me a note.

#9 @netweb
5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In 6048:

Tests: Add test_bbp_get_do_not_reply_address() common functions reply email address test

Props thebrandonallen
Fixes #2822

Note: See TracTickets for help on using tickets.