Skip Navigation

[Resolved] Email notification is not received.

This support ticket is created 2 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 32 replies, has 5 voices.

Last updated by Nigel 2 years, 7 months ago.

Assisted by: Nigel.

Author
Posts
#2134803

Refer this ticket to Waqar,

In reference to this previous ticket: https://toolset.com/forums/topic/split-send-a-different-notification-email-after-submitting-based-on-whether-or-not-the-field-is-selected/.

When testing it appears that we don't receive the email notification for "nieuwe gebruiker geregistreerd PROMO".

However we used your custom code.

#2135191

Hi, Waqar is currently on holiday and expected to return to work on August 20. Would you prefer to speak with another supporter, or continue waiting for Waqar?

#2135197

I prefer another expert to "solve" this issue.

#2135327

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL where you added your form and tell me on what action you setup the "nieuwe gebruiker geregistreerd PROMO" email notification.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2135535

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I just commented out the 2nd condition:

/*
       // if notification is named "Nieuwe gebruiker geregistreerd"
        if ( isset($notification['name']) && 'Nieuwe gebruiker geregistreerd' == $notification['name'] ) {
            // if the checkbox field is checked remove all notification recipients
            if(isset($_POST['wpcf-ik-wil-het-aanbod-gratis-bekijken'][0])) {
                $recipients = array();
            }
        }
        */   

As the 2nd condition also set the recipients to empty. I can see it working. Can you please confirm it works at your end as well.

#2135569

Your custom code for the 2nd condition above is EXACTLY the same as the one Waqar already provided before. Obviously it does NOT work!

Create a TEST registration and send the proper custom code when it actualy works. MAKE SURE that the email notification is sent to the user AND admin at hello@landman.re

We just tested the first condition, and the email notification for that condition is NOT sent anymore either. Also here the notification should be both sent to the user AND admin at hello@landman.re

Sent the COMPLETE code for both the first and second condition which we can copy paste

#2135619

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I'm not sure and dont know why Waqar has added that custom code.

I've just commented out the filter line so the filter function should not run.

//add_filter('cred_notification_recipients', 'modify_recipients_user_form_18888', 10, 4);

then I've run a test with both checked and unchecked checkbox and both time I receive the email. Please check the following screenshot:
- hidden link

I'm not sure if you receive email on: hello@landman.re as I cant confirm as I dont have access to that email.

#2135629

----- Send the "complete" custom code instead of the one that Waqar created (see below) -----
----- We did "not" receive any email at hello@landman.re -----

---------------------------------

add_filter('cred_notification_recipients', 'modify_recipients_user_form_18888', 10, 4);
function modify_recipients_user_form_18888($recipients, $notification, $form_id, $post_id) {
// if specific form
if ($form_id == 18888) {
// if notification is named "Nieuwe gebruiker geregistreerd promo"
if ( isset($notification['name']) && 'Nieuwe gebruiker geregistreerd promo' == $notification['name'] ) {
// if the checkbox field is not checked remove all notification recipients
if(!isset($_POST['wpcf-ik-wil-het-aanbod-gratis-bekijken'][0])) {
$recipients = array();
}
}
// if notification is named "Nieuwe gebruiker geregistreerd"
if ( isset($notification['name']) && 'Nieuwe gebruiker geregistreerd' == $notification['name'] ) {
// if the checkbox field is checked remove all notification recipients
if(isset($_POST['wpcf-ik-wil-het-aanbod-gratis-bekijken'][0])) {
$recipients = array();
}
}
}
return $recipients;
}

#2135633

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

The code that is shared by Waqar is not needed that is why I commented it.

I do not add any code. You should take the backup of the code Waqar shared and delete it and check as per my testing and as I shared the proof it works for me when I disable/delete the code Waqar has added.

#2135677

Deactivated the custom code Waqar shared.
Results:
1/ no email is received by the user
2/ no email is received at hello@landman.re
This is the case for both conditions.

#2135683

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As shared with my previous replay as a user I got both emails in both condition.
- hidden link

- Did you check your email's spam box?
- You should try to add email log plugin and check if email is send.
- https://wordpress.org/plugins/wp-mail-catcher/ or https://wordpress.org/plugins/wp-mail-log/

#2135689

Transfer this ticket to someone who is able to fix this issue.

#2137205

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - Let me pass this ticket to another supporter.

#2137429

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

To better assist you with this issue, I would prefer to take a copy of your website and work on it in my local development environment. Can I take a copy?

#2137433

Transfer this ticket to Nigel.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.