Home › Toolset Professional Support › [Resolved] Adding “Reply To” form admin notifications
Problem:
The issue here is that the user wanted to customize their Toolset Forms notification headers.
Solution:
You can use the function below to modify the email notification headers.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_mail_header
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 |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 14:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Jamaica (GMT-05:00)
This topic contains 5 replies, has 2 voices.
Last updated by johnE-5 3 years, 6 months ago.
Assisted by: Shane.
Hello,
I want to add "Reply To" my cred notification emails. I can do this with one notification form but cannot do it with more than one form. ( using this topic: https://toolset.com/forums/topic/emails-from-a-toolset-form-needs-to-reply-to-the-person-who-submitted-it/#post-1457297)
How do I add "Reply To" multiple notification forms?
T
Thanks
John
Hi John,
Thank you for getting in touch.
For clarity here is it that you are using the code from Waqar's ticket to modify the reply to header? However you want this to apply to multiple notifications ?
Please let me know.
Thanks,
Shane
Hi Shane,
Yes, I want to be able to modify multiple notifications. I can only modify one using the code from Waqar's ticket.
Any help would be appreciated.
John
Hi John,
Thank you for the clarity.
You are actually able to extend the function to include more notifications. Have a look at the example below.
function customise_cred_notifications( $headers, $formid, $postid, $notification_name, $notification_number ) { if ($formid==1129 && $notification_name=='Send Inquiry') { $myheaders = array( 'Reply-To: '.$_REQUEST["email"] ); return array_merge($headers, $myheaders); } if ($formid==1234 && $notification_name=='Next Notification') { $myheaders = array( 'Reply-To: '.$_REQUEST["email"] ); return array_merge($headers, $myheaders); } return $headers; } add_filter('cred_mail_header', 'customise_cred_notifications', 10, 5);
Notice that i've added a second "if" statement that is only meant to run when its criteria is matched.
Please let me know if this provides some direction for you.
Thanks,
Shane
That's great, Thanks Shane
My issue is resolved now. Thank you!