No, the plugin does not use php mail. It uses the WordPress mail function: https://developer.wordpress.org/reference/functions/wp_mail/
I just tested it on my own website https://arnowelzel.de which also runs with PHP 8.1 – and I had no problem at all.
But maybe your hoster is blacklisted by some services – this often happens with GMail or Microsoft (outlook.com, Hotmail etc.) and therefore mails never reach their recipients. This can be avoided by using SMTP providers like Mailjet or Sendinblue along with a SMTP plugin. Maybe you should give it a try, just to be sure. Mailjet and Sendinblue provide free accounts with up to 5000 or 6000 mails per month.
Thread Starter
mathse
(@mathse)
Hello,
I host my own mailserver and I see that no Mail goes out (is sent).
I can use wp_mail with
https://wordpress.org/plugins/check-email/
so this should be not the issue.
Any things, that I could do to debug this further?
The last mail was sent on June 29 – since I update plugins regularly, maybe this was the date of an update of the plugin?
Thanks for the quick reply and greetings
mathse
Well – on my server the plugin works fine (I also run my own mailserver), so I don’t know what is wrong.
The last update of the plugin was on June 23, 2022 – which is about two weeks ago. If you believe the latest changes cause a problem, just go back to an older version (maybe 1.24.0) and check if that works for you.
This is the code which is responsible to send the e-mail, and this was not changed with the latest updates:
https://github.com/arnowelzel/worpdress-comment-reply-email-notification/blob/main/classes/CommentReplyEmailNotification.php#L201-L237
This is the same code in an older release – exactly identical:
https://github.com/arnowelzel/worpdress-comment-reply-email-notification/blob/ea11f13572b4c5ad0ca47a9fdd65cd8007af8f55/classes/CommentReplyEmailNotification.php#L201-L237
Thread Starter
mathse
(@mathse)
Thanks again for your reply!
I found the cause of the issue. Mails are only sent, if I enable:
E-Mail-Benachrichtigung senden, wenn der Kommentar genehmigt wurde
Strange is: Intuitively I thought, that the plugin sends mails when I allow replies to someones comment without this checkbox enabled. But it just sends mails, if I enable this checkbox.
So, when enabling this checkbox, everything works as expected. Is this intended?
Greetings
mathse
Thanks for the feedback!
That option was introduced by a contributor – maybe I’ll remove it again since it makes no sense to disable this.
If comments do not need any approval, than this option does not matter as e-mails will get send as soon as a comment was posted.
However if comments need to be approved by you first, then e-mails will not be sent right directly after sending a comment but only after the respective comment was approved by an admin and this option is enabled.
But as I said – as it usualyl makes no sense to disable sending e-mails after approval I likely will remove this for the next update. Sorry for the confusion.
I just published an update to 1.27.0 which fixes this issue. The option for sending e-mail on comment approval was removed as it makes no sense.
Editing the e-mail template in the backend will be added with a future update.
Thread Starter
mathse
(@mathse)
Wow! Thanks for the fast reply and the quick fix!
Great work and great Plugin!
Greetings
mathse
Hello
I know the issue is closed, but I am having the same issue and would like to learn how to debug the problem.
An example blog page (with comments) of my page is this: https://www.grupotorresocana.com/blog/es-obligatorio-retirar-amianto-comunidad-vecinos/
I have made several tests but never got any email when the comments were replied.
First of all check if the e-mail is actually registered at all for the comment. See in the backend under “Comments” at “Comment subscriptions”.
Then check if WordPress is able to send e-mail at all. You can use the “Check & Log Email” plugin to do so.
It may also happen that the IP address of your server or your hoster is blacklisted and e-mails will never reach their destination. In this case you have to ask the hoster for assistance or use services like Mailjet or Sendinblue and a plugin like “SMTP Mailer” or “YaySMTP” to send emails using that service instead of your hosting environment.
Hello Arno
Thank you a lot for the tips.
Of course, I am testing this plugin inserting (my) email address.
After testing your tips, it seems that WordPress can send emails correctly: Emails are sent correctly when tested with “Check & Log Email” plugin (using same address and I used on comments). Actually, we have automatic replies to forms that has been working for long already.
Regarding blacklisting: As said, I get emails from WordPress, just not from this plugin.
Is there anything else to see where the problem is?
Is your e-mail address recorded in the comments? Did you check the menu item “Comment subscriptions”? If the e-mail address is not visible there, then no e-mail will be sent.
You can also check the logs of your webserver if there are any error messages recorded.
If nothing can be found there either, I don’t know what to do, sorry – without any error messages at all there is no way to find out what is wrong except adding debug code to the plugin to write some kind of log what is going on in detail.