From 5223347845060b5af3983509582956a66def815e Mon Sep 17 00:00:00 2001 From: Kelly Gardner <8794844+kmgardner@users.noreply.github.com> Date: Wed, 25 Sep 2019 14:15:11 -0400 Subject: [PATCH 1/3] Added CC and BCC email options --- plugins/fabrik_form/email/email.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/fabrik_form/email/email.php b/plugins/fabrik_form/email/email.php index 0cc0cd35eed..e5d4f19c739 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); From fe96720d2d2b0e4ce58b1251ff0cfe9651de4a6b Mon Sep 17 00:00:00 2001 From: Kelly Gardner <8794844+kmgardner@users.noreply.github.com> Date: Wed, 25 Sep 2019 14:16:16 -0400 Subject: [PATCH 2/3] Added CC and BCC email options --- plugins/fabrik_form/email/forms/fields.xml | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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"/> + + + +
From ea4d1c522b2c949f9c5eb6614c637862a101b390 Mon Sep 17 00:00:00 2001 From: Kelly Gardner <8794844+kmgardner@users.noreply.github.com> Date: Wed, 25 Sep 2019 14:17:03 -0400 Subject: [PATCH 3/3] Added CC and BCC email options --- .../email/language/en-GB/en-GB.plg_fabrik_form_email.ini | 4 ++++ 1 file changed, 4 insertions(+) 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"