Skip to content

Instantly share code, notes, and snippets.

@New0
Last active February 22, 2018 20:30
Show Gist options
  • Save New0/9153a4393c25630f67322b350e2cacbb to your computer and use it in GitHub Desktop.
Save New0/9153a4393c25630f67322b350e2cacbb to your computer and use it in GitHub Desktop.
Set the Reply to email addresses to match all tge recipients email addresses (will take recipients of conditional recipients processor)
<?php
add_filter( 'caldera_forms_mailer', function( $mail, $data, $form ) {
//MAKE SURE TO CHANGE FORM ID
if( "CF5a5e8452c6f82" == $form[ 'ID' ] ) {
//If Pro NOT activated
$mail[ 'replyto' ] = $mail[ 'recipients' ];
//IF Pro Activated
//$mail[ 'from' ] = $mail[ 'recipients' ];
}
return $mail;
}, 50, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment