Skip to content

Commit 834a263

Browse files
committed
Added: Reply-to field
Now user can add one or more reply-to emails.
1 parent c7b3ca0 commit 834a263

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

helper.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,14 @@ public static function submitForm($ajax = false) {
213213
if (!empty($recipients)) {
214214
$mailer->addRecipient($recipients);
215215
}
216+
217+
// Reply-To
218+
$reply_to = !empty($params->get('reply_to', '')) ? $params->get('reply_to') : '';
219+
$reply_to = explode(',', $reply_to);
220+
if (!empty($reply_to)) {
221+
$mailer->addReplyTo($reply_to);
222+
}
223+
216224
// CC
217225
$cc = !empty($params->get('email_cc', '')) ? $params->get('email_cc') : '';
218226
$cc = empty($cc) ? [] : explode(",", $cc);

language/en-GB/en-GB.mod_jdsimplecontactform.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ MOD_JDSCF_EMAIL_SUBJECT_DESC="Subject of the email (<b>You can use {field:label}
114114
MOD_JDSCF_EMAIL_TO_LBL="Email Address"
115115
MOD_JDSCF_EMAIL_TO_DESC="Enter the email address to recieve submissions. Use comma to seperate multiple emails."
116116

117+
MOD_JDSCF_REPLY_TO_LBL="Reply-to Email"
118+
MOD_JDSCF_REPLY_TO_DESC="Enter the email Reply-to email address"
119+
117120
MOD_JDSCF_EMAIL_CC_LBL="CC Email"
118121
MOD_JDSCF_EMAIL_CC_DESC="CC email address to recieve submissions. Use comma to seperate multiple emails."
119122

mod_jdsimplecontactform.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@
121121
label="MOD_JDSCF_EMAIL_TO_LBL"
122122
description="MOD_JDSCF_EMAIL_TO_DESC"
123123
/>
124+
<field
125+
name="reply_to"
126+
type="text"
127+
label="MOD_JDSCF_REPLY_TO_LBL"
128+
description="MOD_JDSCF_REPLY_TO_DESC"
129+
/>
124130
<field
125131
name="email_cc"
126132
type="text"

0 commit comments

Comments
 (0)