in the attached scipt i have new york and nj going to two emails and all others to two others
how do I mask them or bcc them i dont want marc to know paul got it or vice versa
<?PHP
class MyCustomConditionalEmail extends FM_ExtensionModule
{
//BeforeSendingFormSubmissionEMail is called for each of the receipients in the
// (in the 'form to email' page of Simfatic Forms)
function BeforeSendingFormSubmissionEMail(&$receipient,&$subject,&$body)
{
if(false !== strpos($receipient,'Admin'))
{//All submissions are sent to the Admin address. so return true.
return true;
}
elseif(false !== strpos($receipient,'dept@user5.com'))
{
//For this example, the input that determines the email
//address is the
//drop-down list named Department.
$State = $this->formvars['State'];
//dept@user5.com is a placeholder email address given in
//Simfatic Forms -> Form to email page
//We can replace that email address here. set the $receipient
//to the corresponding email address.
switch($State)
{
case 'New York':
$receipient = 'Marc<search4f@gmail.com> , Paul<sellmyjunkcarnynj@gmail.com>';
break;
case 'New Jersey':
$receipient = 'Marc<search4f@gmail.com> , Paul<sellmyjunkcarnynj@gmail.com>';
break;
default;
$receipient = 'All Other States<dms99@optonline.net> , other48<1donamar@gmail.com>';//If the State is not New York or New Jersey, It will the email here.
}
}
//return true to send the email; return false to block the email
return true;
}
}
?>

