Admin Emails are working fine but no notifications to users
I'm using sendgrid to deliver my emails. All admin emails are going out just fine, interestingly they're going from and to the same address, but the individual notification emails aren't going out. I've verified in the sendgrid activity that they're not being generated at all. I checked they're enabled, created a new subscription, etc but don't really know where else to look. I realize the range of options can be challenging but I'm hoping the fact that all the admin emails work flawlessly and none of the user emails work might be a hint as to the source of the problem.
wpForo doesn't have its own email functions. It uses WordPress's wp_mail() function. if sendgrid is well codded and if it uses all wp_mail() hooks, it should work with wpForo notifications too. wpForo email settings are located in Dashboard > Forums > Settings > Emails admin page. You can set custom FROM email and FROM name for notification emails.
Thanks for the reply. I went and looked in functions.php and saw you're using wp_mail(). All other email is being delivered properly and one half of the WPForo's email is also being delivered properly. I'm pretty confident this isn't an issue with SendGrid or the SendGrid integration. The other piece of data I've gained since is that when the 'Enable Subscription Confirmation' setting is turned on it seems that more email is delivered, including notifications of new posts. I'm not certain if more than that is being delivered but at least new posts are being notified at that point.
I'm still looking for help on this. I've installed a hook to log all wp_mail invocations. I'm seeing that some email is simply not being generated. Here's an example where both recipients received notification as they should have:
|2018-04-17 16:45:firstname.lastname@example.org||Please Moderate: New Reply||From: Panbo - Forum|
|2018-04-17 16:45:email@example.com||Please Moderate: New Reply||From: Panbo - Forum|
But then here only webmaster received the email:
|2018-04-17 15:24:firstname.lastname@example.org||Please Moderate: New Topic||From: Panbo - Forum|
I'm stumped. Sometimes the emails are generated as they should be, other times they aren't. Every email that makes it to a succesful invocation of wp_mail is delivered without any problems. It just seems as though sometimes wpForo isn't generating the emails.
You could install this:
and check their logs for everything. It has helped me debug email problems some times. It is the old PostMan plugin.