diff --git a/plugins/fabrik_form/email/email.php b/plugins/fabrik_form/email/email.php index 07a446b076c..25fe9190a19 100644 --- a/plugins/fabrik_form/email/email.php +++ b/plugins/fabrik_form/email/email.php @@ -173,8 +173,20 @@ public function onAfterProcess() $this->addAttachments(); - $cc = null; - $bcc = null; + if (!empty($params->get('email_cc'))) { + $cc = $params->get('email_cc'); + } + else + { + $cc = null; + } + if (!empty($params->get('email_bcc'))) { + $bcc = $params->get('email_bcc'); + } + else + { + $bcc = null; + } // $$$ hugh - test stripslashes(), should be safe enough. $message = stripslashes($message); diff --git a/plugins/fabrik_form/email/forms/fields.xml b/plugins/fabrik_form/email/forms/fields.xml index 9f062e6eced..b77fd35742a 100644 --- a/plugins/fabrik_form/email/forms/fields.xml +++ b/plugins/fabrik_form/email/forms/fields.xml @@ -30,6 +30,32 @@ multiple="true" repeat="true" size="6"/> + + + +
diff --git a/plugins/fabrik_form/email/language/en-GB/en-GB.plg_fabrik_form_email.ini b/plugins/fabrik_form/email/language/en-GB/en-GB.plg_fabrik_form_email.ini index c64f47046f1..a42afca08cd 100644 --- a/plugins/fabrik_form/email/language/en-GB/en-GB.plg_fabrik_form_email.ini +++ b/plugins/fabrik_form/email/language/en-GB/en-GB.plg_fabrik_form_email.ini @@ -9,6 +9,10 @@ PLG_FABRIK_FORM_EMAIL_TO_LABEL="Email to" PLG_FABRIK_FORM_EMAIL_TO_DESC="Comma separated list of email addresses. Dynamically include form data by entering {tablename___elementname}. Make sure that the placeholder contains a valid email address, depending on element type and settings you may have to use {table___element_raw}" PLG_FABRIK_FORM_EMAIL_TO_EVAL_LABEL="Email to (eval)" PLG_FABRIK_FORM_EMAIL_TO_EVAL_DESC="OPTIONAL - PHP code to generate a comma separated list of recipient addresses. Will be appended to anything specified in 'Email to'." +PLG_FABRIK_FORM_EMAIL_CC_LABEL="Email CC" +PLG_FABRIK_FORM_EMAIL_CC_DESC="OPTIONAL - Enter a single email address to be CC'd a copy of the email. Does not work with placeholders." +PLG_FABRIK_FORM_EMAIL_BCC_LABEL="Email BCC" +PLG_FABRIK_FORM_EMAIL_BCC_DESC="OPTIONAL - Enter a single email address to be BCC'd a copy of the email. Does not work with placeholders." PLG_FABRIK_EMAIL_FROM_LABEL="From" PLG_FABRIK_EMAIL_FROM_DESC="OPTIONAL a single address to use as the address to send the email from. Specify an optional 'friendly names' by separating email and name with a colon (:). E.g. 'my@email.com:John Doe'. Can use placeholders. If left blank, will default to J!'s server default email address." PLG_FABRIK_EMAIL_RETURN_PATH_LABEL="Reply-to"