• Resolved boblodi

    (@boblodi)


    My apologies, i thought i was posting in the right place for not receiving notifications.

    Hi there – i thought i posted this the other day but i guess not.

    Our notifications have stopped sending. we’re not using the moderator plugin.

    all versions i believe are current, and i’ve tried everything in the list at the top of this thread.

    What’s left to try and debug it?

    i do receive password reset emails, so, the system is sending mail out.
    we just don’t get mail for any forum activity that we have flagged to send notifications for.

    all and any help appreciated!

    https://ww.wp.xz.cn/plugins/bbpress-notify-nospam/

Viewing 15 replies - 1 through 15 (of 30 total)
  • Plugin Author useStrict

    (@usestrict)

    Hi boblodi,

    Are you using any of the add-ons such as Digests or Opt-out?

    You can check the recipient list by adding the following to your theme’s functions.php file:

    function my_check_recipients( $recipients )
    {
        error_log(__FILE__ . ':' . __LINE__ . ' Recipient_list: ' . print_r(array_keys($recipients),1), 3, __DIR__ . '/recipients.log');
        return $recipients;
    }
    add_filter('bbpnns_filter_recipients_before_send', 'my_check_recipients');

    It will generate a file called ‘recipients.log’ in your theme directory containing the IDs of people in the mailout queue.

    Let me know if it’s empty or not.

    Cheers,
    Vinny

    Thread Starter boblodi

    (@boblodi)

    Hi Vinny-

    thanks for that. i added the code to functions.php but I don’t see a file generated, in the theme directory or eleewhere. do i need to do something to kick that off? like try and send a notification?

    plugin-wise, we are using the opt out plugin. just updated to 1.2.3 about 5 minutes ago.

    we are also using bbpress search widget, and bbpress genesis extend.

    for more fun – which may or may not matter – we are also using wp-members.

    Plugin Author useStrict

    (@usestrict)

    Yes, you’ll have to try to send a notification (Admin -> Topics -> Edit a Topic -> Click ‘Send Notifications’ checkbox -> Click Update).

    Thread Starter boblodi

    (@boblodi)

    Perfect – thank you! I see this in the recipients.log
    Recipient_list: Array
    (
    [0] => 2973
    [1] => 1458
    [2] => 13
    [3] => 3
    [4] => 1597
    [5] => 2817
    [6] => 22
    [7] => 3350
    [8] => 19
    [9] => 3510
    [10] => 2583
    [11] => 2810
    )
    `

    Plugin Author useStrict

    (@usestrict)

    Please edit your message and remove the path to the file. I shouldn’t have added the __FILE__ constant to the debugging. It’s not a good idea to have the install path made public.

    Can you check with those users if they’re receiving the messages?

    Thread Starter boblodi

    (@boblodi)

    I am two of the users, and I am not. Emma – my client – is another two users, and she is not. In email or in spam.

    Plugin Author useStrict

    (@usestrict)

    Let’s bump up the priority of the filter a bit and see the result. Change the add_filter line above so that it becomes:

    add_filter('bbpnns_filter_recipients_before_send', 'my_check_recipients', 1000000, 1);

    That’ll give the Opt-out plugin time to do its thing before we check the recipients list.

    Thread Starter boblodi

    (@boblodi)

    I really appreciate the help.

    I just tried that. Looks the same to me.

    (
        [0] => 2973
        [1] => 1458
        [2] => 13
        [3] => 3
        [4] => 1597
        [5] => 2817
        [6] => 22
        [7] => 3350
        [8] => 19
        [9] => 3510
        [10] => 2583
        [11] => 2810
    )
    Plugin Author useStrict

    (@usestrict)

    OK, so let’s try to get some debugging when an email fails.

    function my_capture_failed_email( $user_info, $filtered_subject, $filtered_body, $recipient_headers )
    {
        error_log(__LINE__ . sprintf( " Sending email failed. User ID %d, email %s\n", $user_info->ID, $user_info->user_email), 3, __DIR__ . '/recipients.log');
    }
    add_action('bbpnns_email_failed_single_user', 'my_capture_failed_email', 10, 4);

    But don’t paste the emails here. Just check if you get anything out. If you do, then wp_mail() is failing. If not, the messages are getting sent and lost along the way. You’d have to check with your SMTP provider (if using SMTP) or email host.

    Thread Starter boblodi

    (@boblodi)

    OK – fail!

    i got a list of these-

    495 Sending email failed. User ID 2973, etc etc

    Thread Starter boblodi

    (@boblodi)

    So – while i can in fact recieve password reset emails, but not these – is that a server setting somewhere do you think? or some other conflict?

    Plugin Author useStrict

    (@usestrict)

    Let’s make sure that the subject and body are not empty:

    function my_capture_failed_email( $user_info, $filtered_subject, $filtered_body, $recipient_headers )
    {
        error_log(__LINE__ . sprintf( " Sending email failed: " .
      		print_r(array( 'id' => $user_info->ID,
    		'user_email' => $user_info->user_email,
        	'subject' => $filtered_subject,
        	'body' => $filtered_body,
        	'headers' => $recipient_headers,
        ),1)), 3, __DIR__ . '/recipients.log');
    }
    add_action('bbpnns_email_failed_single_user', 'my_capture_failed_email', 10, 4);

    I don’t know why wp_mail() would be failing if the message isn’t blank (it shouldn’t be). Next step would be debugging wp_mail(). Perhaps installing/setting up wp-smtp-email plugin (which is what I do).

    Cheers,
    Vinny

    Thread Starter boblodi

    (@boblodi)

    I’ll try this next. i *want* to be using an smtp plugin, but, it’s been a challenge getting that info from the client’s end.

    Thread Starter boblodi

    (@boblodi)

    Hi Vinny- this last script is taking the site down. i tried it a few times, i don’t thikn i am missing any ;’s or anything…

    Plugin Author useStrict

    (@usestrict)

    I’ve edited my previous post as I pasted the wrong code originally. This one will present a structured output with keys/values.

    My editor doesn’t complain of any syntax errors. Please give it a try.

Viewing 15 replies - 1 through 15 (of 30 total)

The topic ‘Client not recieving notifications’ is closed to new replies.