Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions plugins/fabrik_form/email/email.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
26 changes: 26 additions & 0 deletions plugins/fabrik_form/email/forms/fields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,32 @@
multiple="true"
repeat="true"
size="6"/>

<field name="email_cc"
type="listfields"
repeat="true"
mode="gui"
at="true"
rows="1"
valueformat="tableelement"
usestep="true"
addbrackets="true"
class="span5"
description="PLG_FABRIK_FORM_EMAIL_CC_DESC"
label="PLG_FABRIK_FORM_EMAIL_CC_LABEL" />

<field name="email_bcc"
type="listfields"
repeat="true"
mode="gui"
at="true"
rows="1"
valueformat="tableelement"
usestep="true"
addbrackets="true"
class="span5"
description="PLG_FABRIK_FORM_EMAIL_BCC_DESC"
label="PLG_FABRIK_FORM_EMAIL_BCC_LABEL" />

</fieldset>
<fieldset label="COM_FABRIK_OPTIONS" name="plg-form-email-options">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down