I have a form that has email notifications enabled, sending to 3 recipients when the form is submitted. I am also using WP Mail SMTP plugin with Brevo (SendinBlue) service to ensure email delivery. Unfortunately it appears that the email is not being initiated on the WP end, there are no records of them in Brevo.
Form: Confirm Container Min (ID: 869)
Thanks,
Matt
Hi Matt,
Thank you for contacting us and I'd be happy to assist.
I've performed some tests on my website with a similar form and notification settings and couldn't reproduce any issue.
Also, I used the 'Send test email' feature from your website's form and received it, even though it landed in spam.
( screenshot: hidden link )
Have you tried this 'Send test email' feature with your email addresses? And have you tested this with different email addresses than the currently set?
I'll recommend testing the form with different email addresses and also with extra/non-Toolset plugins disabled. This will help in narrowing down the possible conflict.
In case the issue the persists, I'll need your permission to download the clone/snapshot of your website. This will help in investigation this on a different server, without affecting the actual website.
regards,
Waqar
Waqar,
I have tested several times and the test emails get sent, and I see them logged in Brevo. The same cannot be said for the actual emails, the form has been submitted many times (it also edits a post) and the email is going to three mailboxes none of which receive it, and there is no record of them in Brevo.
You can certainly grab a backup, or if you need me to provide a duplicator package I can do so, whichever is easier.
Thanks,
Matt
Thank you for sharing this update.
Before moving the troubleshooting to a different server, I'd request some on-site testing as I suspect it could be environment dependent.
Can you please temporarily enable WordPress debugging and then include this custom code in the website?
( ref: https://wordpress.org/documentation/article/debugging-in-wordpress/ )
add_filter('cred_notification_recipients', 'custom_recipients_check', 10, 4);
function custom_recipients_check($recipients, $notification, $form_id, $post_id) {
// Check notification name matches target notification
if ( isset($notification['name']) && 'Confirm Container' == $notification['name'] ) {
error_log(print_r($recipients,true));
error_log('===========================================');
}
return $recipients;
}
The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through the active theme's "functions.php" file.
It will output the list of 'recipients' for the form notification in question, in the server's error log. Also, if you see any other errors/warnings related to form notification, please also share them with us.
Waqar,
Thank you for the instructions, I've done as you instructed and I'm awaiting the form to be used on the live implementation to capture the error logs. I anticipate having at least a few submission in the next day or so, I will follow up when I have them.
Thanks,
Matt
Sure please take your time and I'll wait to hear back from you.
Waqar,
I confirmed that the form was used yesterday, so emails should have been sent but they were not. I have the debug.log file you requested, but it looks like only image files can be uploaded on this form currently. Appreciate any help you can provide.
Thanks,
Matt
If the log file's text/content is not too long, you can paste it directly in your reply.
Alternatively, you can copy/paste it into a text file and upload it to any file sharing service like Google Drive, OneDrive etc and share its link in the message.
I've uploaded two log files to the share below. One is just a trimmed down version of the first day and a half of the debug being on, the other is much larger and contains the full log up until now.
hidden link
Thanks,
Matt
Thank you for the error log, but unfortunately, it wasn't very conclusive.
I tried to create a duplicator package from your website but it was showing some error.
The automatically scheduled duplicator package seems to be getting created, but they are stored at OneDrive.
Can you please share a link to latest Duplicator package, with both the installer and the archive files? I've set your next reply as private.
Thank you for sharing the duplicator package.
I'll be running some tests on this and will share the findings, accordingly.
Thank you for your patience.
Just wanted to let you know that I'm still working on this.
Will share the detailed findings with you today.
Thank you for waiting, as I completed this troubleshooting.
It seems that the similar form names have caused the main confusion.
In the website's clone, I couldn't find any page/post/template where the form 'Confirm Container Min' (ID: 869) was in use.
The single 'Containers' post page uses edit link that uses the template 'Edit Container' ( ID: 427 ) to show the edit form.
But the form used there is not the 'Confirm Container Min' (ID: 869) but 'Edit Container' (ID: 332). And this form doesn't have any email notification.
If you'll change this form in the template to 'Confirm Container Min' (ID: 869) and test it, the email notification from the form will be received correctly.
Note: There are some Toolset plugin updates pending on the website. You'll need to update all Toolset plugins to the latest version, before you'll be able to make changes to the content templates.
Waqar,
I retraced the form back from the page and I did reference the wrong form, my apologies. However it looks like it is form 508 that is actually the one being used, and the notifications were in place on that form. The issue appears to be that they were setup to trigger on 'publish' not on form submit.
Thank you for all your help, this throwing me off for a while. I will be more careful before submitting this type of ticket again.
Matt