What version of bbpnns are you using? Are you using wpMandrill with it? If so, check that the email addresses aren’t blacklisted.
What do you mean by ‘turn off all emails’? You can make a topic without notifying by using the Admin and making sure the ‘Notify recipients’ checkbox on the right-side metabox is unchecked.
Hello,
I’m experiencing the same issue. No emails are being generated (checked with email log plugin). I have not tamprerd with any settings for months. It seem to have been caused by the latest update.
I can’t replicate the issue. Can you try installing version 1.8.1 and letting me know if it’s fixed?
1.8.2
I dont know what Mandrill is
by “turn off” If I deselected all the groups I wanted emails to be sent to, and created the topic in the admin UI then it would send the emails,
I have no clue what changed, however it started working on its own again?
Mine is still not sending any emails. Hm… I can’t figure out what it might be. Is the 1.8.1 version avalible somewhere?
All versions are available under the Developers link in the Plugin page. Here’s the direct link: https://downloads.wp.xz.cn/plugin/bbpress-notify-nospam.1.8.1.zip
I was thinking about this and it occurred to me that it might be related to the WP 4.3 cron bug – if you’re using background mailing and you were affected by the wp-cron bug, your system might be overwhelmed with the bad cron jobs.
So, what WP version are you using? Are you using background mailing? Try disabling as a test. Also try installing https://ww.wp.xz.cn/plugins/wp-cron-control/ and looking at the scheduled cron jobs to find the mailout ones.
I think you might be right, WP 4.3 (which I use) have broken alot of things! Will try these things.
Thanks for your suggestions and being so helpful!! Really appriciate it.
Ok,
So the issue is back again.
I am using WP 4.3
I do not have the setting in your plugin “Send emails in the background the next time the site is visited” enabled.
I installed the cron control but am not sure what to do with it.
The issue is back
Does that mean it started working after that last message?
Try installing this plugin: https://ww.wp.xz.cn/plugins/wp33423-hotfix/
It is supposed to fix the 4.3 bug, but as you’re saying that you don’t have background notifications enabled, it shouldn’t be the cause of the problem.
Try adding some debugging statements to bbpnns to see if wp_mail() is actually being called.
Just above this line:
add_filter( 'mandrill_nl2br', array( &$this, 'handle_mandrill_nl2br' ), 10, 2 );
Add this:
error_log(__LINE__ . ' calling wp_mail() with email ' . print_r($email,1), 3, dirname(__FILE__) . '/out.log');
And try it out. You will see the results in the out.log file in the same directory as the plugin. If nothing is there, then something is stopping the code from reaching that point. Otherwise you have a mailing issue elsewhere.
Ok this is what I have now in your plugin
// Turn on nl2br for wpmandrill
error_log(__LINE__ . ‘ calling wp_mail() with email ‘ . print_r($email,1), 3, dirname(__FILE__) . ‘/out.log’);
add_filter( ‘mandrill_nl2br’, array( &$this, ‘handle_mandrill_nl2br’ ), 10, 2 );
I will test it and see what happens.
When you say the the results with be in the same directory as the plugin do you mean i have to access it from FTP?
thanks
FTP, SSH, SCP – whatever rocks your boat 🙂
Did you run the plugin after you added the debug? The fastest way to get it to run is to update a topic making sure that the ‘Notify recipients’ checkbox is checked.
The downside of this is that everyone will receive a new notification.
You can enable a dry-run, by setting the bbpnns_dry_run filter to ‘__return_true’ but in that case you’d have to move the error_log() line further up.
In functions.php:
add_filter( 'bbpnns_dry_run', '__return_true' );
In bbpress-notify-nospam.php
...
$email = apply_filters( 'bbpnns_skip_notification', $email ); // Allow user to be skipped for some reason
// Add this here
error_log(__LINE__ . ' calling wp_mail() with email ' . print_r($email,1), 3, dirname(__FILE__) . '/out.log');
if ( ! empty( $email ) && false === apply_filters( 'bbpnns_dry_run', false ) )
...
I added the code to my functions, but I cannot find the code where you want me to move the error log code above
Sorry, the example was taken from version 1.9 (not out yet) that has some changes. In version 1.8.2 it’s on line 444:
if ( false === apply_filters( 'bbpnns_dry_run', false ) )