Tell us what you are trying to do? Implement the suggestions from previous request:
https://toolset.com/forums/topic/sending-an-email-to-an-address-affiliated-with-a-one-in-a-one-to-many/
Is there any documentation that you are following?https://toolset.com/forums/topic/sending-an-email-to-an-address-affiliated-with-a-one-in-a-one-to-many/
Is there a similar example that we can see?
What is the link to your site? hidden link
Thank you for the code, and apologies for not responding sooner! I was stuck in airport hell for several days last week. 🙂
I tried your solution - I checked to be sure everything was set up as you described, and it is.
I changed the email addresses in the custom code to two addresses I have control over (different ones so I can see which trigger fires):
//Add proper address for each country
if ($the_name == 'Africa Alliance') {
$recipients[] = array(
'to' => 'to',
'address' => 'babs4104@gmail.com',
);
} else {
$recipients[] = array(
'to' => 'to',
'address' => 'info@wisdomwebconsulting.com',
);
}
Saved that, and opened an incognito window and submitted a response to this:hidden link
I received the "thank you for submitting" email, but I did not receive a notification email.
Thinking it might be related to permissions somehow, I did the same thing again - only this time while logged into the site. Same result.
What am I missing? I tried taking off the commas after the emails - that did not help.
Thank you!!!
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
As Christopher shared with his previous reply, he added the following hidden field to the form:
=> https://toolset.com/forums/topic/sending-an-email-to-an-address-affiliated-with-a-one-in-a-one-to-many/#post-2617025
[cred_generic_field type='hidden' field='email-country']
{
"required":0,
"validate_format":0,
"default":"[wpv-post-field name="wpcf-procurement-country" id='[wpv-post-param var="parent_rfq_id"]']"
}
[/cred_generic_field]
When I checked the form on the following site:
=> hidden link
I do not find that hidden field is available, maybe you missed to add the above hidden field to the form where you are testing.
There field is already available with the dev site form:
- hidden link
Can you please try to add that missing hidden field to your form and check again.
Thank you! Confusion on my part. Thanks for setting me straight! I got it working last night.
Two more little things - I need to get the name of the country and the title/id of the RFP into the email that gets sent to the country address. Can you point me in that direction?
And - one more - if an RFQ had be categorized to more than one country, would this still work?
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Glad to know that the solution I shared help you to resolve your issue.
As per our support policy, we entertain only one question per ticket. This will help other users searching on the forum as well as help us to write correct problem resolution summery.
I'll split the ticket with your new question and you are welcome to mark resolve this ticket. we will continue with the following split ticket.
=> https://toolset.com/forums/topic/split-sending-an-email-to-an-address-affiliated-with-a-one-reopening-add-country-name-and-id-to-the-email-notification/