Home › Toolset Professional Support › [Resolved] Setting From et Reply-To fields with CRED
Problem:
How to add "Reply To" in CRED email header.
Solution:
With CRED 1.5.2, we have added new filter "cred_mail_header" using which you can add header elements to your CRED emails.
You can find proposed solution on the following reply:
https://toolset.com/forums/topic/setting-from-et-reply-to-fields-with-cred/#post-380580
Relevant Documentation:
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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
Tagged: Toolset Forms
This topic contains 15 replies, has 2 voices.
Last updated by volodiaB 8 years ago.
Assisted by: Minesh.
Hi!
For those interested, I made it work with the following code in the functions.php file of my theme :
// Set From parameter in emails add_filter( 'cred_mail_header', 'add_my_header', 10, 3 ); function add_my_header( $headers, $formid, $postid, $notification_counter = 0 ) { if ( $formid === 24 ) { $email = types_render_field( "email", array( "raw"=>"true" ) ); $nom = types_render_field( "nom" ); $myheaders = array( 'From: ' . $nom . ' <' . $email . '>' ); return array_merge( $headers, $myheaders ); } }
Cheers,
Volo