FIX: duplicate replyTo addresses appended

This commit is contained in:
Prem Mariappan 2013-01-29 22:40:28 +13:00 committed by Will Rossiter
parent 866d68e556
commit 203898bd1a
19 changed files with 70 additions and 61 deletions

View File

@ -825,7 +825,6 @@ JS
// email users on submit.
if($this->FilteredEmailRecipients()) {
$email = new UserDefinedForm_SubmittedFormEmail($submittedFields);
$email->populateTemplate($emailData);
if($attachments){
foreach($attachments as $file) {
@ -848,7 +847,7 @@ JS
$email->setTo($recipient->EmailAddress);
if($recipient->EmailReplyTo) {
$email->replyTo($recipient->EmailReplyTo);
$email->setReplyTo($recipient->EmailReplyTo);
}
// check to see if they are a dynamic reply to. eg based on a email field a user selected
@ -856,7 +855,7 @@ JS
$submittedFormField = $submittedFields->find('Name', $recipient->SendEmailFromField()->Name);
if($submittedFormField && is_string($submittedFormField->Value)) {
$email->replyTo($submittedFormField->Value);
$email->setReplyTo($submittedFormField->Value);
}
}
// check to see if they are a dynamic reciever eg based on a dropdown field a user selected
@ -1056,4 +1055,14 @@ class UserDefinedForm_SubmittedFormEmail extends Email {
public function __construct($submittedFields = null) {
parent::__construct($submittedFields = null);
}
/**
* Set the "Reply-To" header with an email address rather than append as
* {@link Email::replyTo} does.
*
* @param string $email The email address to set the "Reply-To" header to
*/
public function setReplyTo($email) {
$this->customHeaders['Reply-To'] = $email;
}
}

View File

@ -163,8 +163,8 @@ ar_SA:
ONCOMPLETE: "تم اكتمال الطلب"
ONCOMPLETELABEL: "عرض الطلبات المكتملة"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "الملفات المستقبلة"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -163,8 +163,8 @@ bg_BG:
ONCOMPLETE: "При завършване"
ONCOMPLETELABEL: "Покажи при завършване"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Получени Заявления"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -160,8 +160,8 @@ da_DK:
ONCOMPLETE: "Ved gennemført"
ONCOMPLETELABEL: "Vis ved gennemført"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Indsendelse modtaget"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -163,8 +163,8 @@ de_DE:
ONCOMPLETE: "Nach Fertigstellung"
ONCOMPLETELABEL: "Nach Vervollständigung anzeigen"
OPTIONS: "Optionen"
ORSELECTAFIELDTOUSEASFROM: ".. oder wähle ein Form Field als Gesendet-Von Adresse"
ORSELECTAFIELDTOUSEASTO: ".. oder wähle ein Form Feld als Sende-An Adresse"
ORSELECTAFIELDTOUSEASFROM: ".. oder wähle ein form field als Gesendet-Von Adresse"
ORSELECTAFIELDTOUSEASTO: ".. oder wähle ein form field als Sende-An Adresse"
PLURALNAME: "User Defined Forms"
RECEIVED: "Erhaltene Einreichungen"
SAVESUBMISSIONS: "Speichern von Einreichungen ausschalten"

View File

@ -163,8 +163,8 @@ en_GB:
ONCOMPLETE: "On complete"
ONCOMPLETELABEL: "Show on completion"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Received Submissions"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -123,30 +123,30 @@ en_US:
NOSUBMISSIONS: "No Submissions"
SUBMITTED: "Submitted at"
UserDefinedForm:
AEMAILRECIPIENT: "A Email Recipient"
EMAILADDRESS: "Email"
EMAILBODY: "Body"
EMAILFROM: "From"
EMAILRECIPIENTS: "Email Recipients"
EMAILSUBJECT: "Email Subject"
FORM: "Form"
FROMADDRESS: "Send Email From"
HIDEFORMDATA: "Hide Form Data from Email"
ONCOMPLETE: "On Complete"
ONCOMPLETELABEL: "Show on completion"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Received Submissions"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"
SENDEMAILTO: "Send Email To"
SENDPLAIN: "Send Email as Plain Text (HTML will be stripped)"
SHOWCLEARFORM: "Show Clear Form Button"
SINGULARNAME: "User Defined Form"
SUBMISSIONS: "Submissions"
SUBMITBUTTON: "Submit"
TEXTONSUBMIT: "Text on submit button:"
DESCRIPTION: 'Generic content page'
EMAILADDRESS: Email
EMAILBODY: Body
EMAILFROM: From
EMAILSUBJECT: 'Email subject'
EmailFromContent: 'The from address allows you to set who the email comes from. On most servers this will need to be set to an email address on the same domain name as your site. For example on yoursite.com the from address may need to be something@yoursite.com. You can however, set any email address you wish as the reply to address.'
FORM: Form
FORMOPTIONS: 'Form Options'
FORMSUBMISSIONS: 'Form Submissions'
FROMADDRESS: 'Send email from'
HIDEFORMDATA: 'Hide form data from email?'
ONCOMPLETELABEL: 'Show on completion'
ORSELECTAFIELDTOUSEASFROM: '.. or select a field to use as reply to address'
ORSELECTAFIELDTOUSEASTO: '.. or select a field to use as the to address'
PLURALNAME: 'User Defined Forms'
RECEIVED: 'Received Submissions'
REPLYADDRESS: 'Email for reply to'
SAVESUBMISSIONS: 'Disable Saving Submissions to Server'
SENDEMAILTO: 'Send email to'
SENDPLAIN: 'Send email as plain text? (HTML will be stripped)'
SHOWCLEARFORM: 'Show Clear Form Button'
SINGULARNAME: 'User Defined Form'
SUBMITBUTTON: Submit
TEXTONSUBMIT: 'Text on submit button:'
UserDefinedForm_EmailRecipient:
PLURALNAME: "User Defined Form Email Recipients"
SINGULARNAME: "User Defined Form Email Recipient"

View File

@ -163,8 +163,8 @@ es_MX:
ONCOMPLETE: "Al completar"
ONCOMPLETELABEL: "Mostrar cuando se complete"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Peticiones Recibidas"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -163,8 +163,8 @@ et_EE:
ONCOMPLETE: "Lõpetamisel"
ONCOMPLETELABEL: "Näita lõpetamisel"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Vastuvõetud kaastööd"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -141,8 +141,8 @@ fi_FI:
ONCOMPLETE: "Valmistuessa"
ONCOMPLETELABEL: "Näytä valmistuessa"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Vastaanotetut lähetykset"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -163,8 +163,8 @@ fr_FR:
ONCOMPLETE: "Complétion en cours"
ONCOMPLETELABEL: "Utiliser la complétion"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Soumissions reçues"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -154,8 +154,8 @@ hr_HR:
ONCOMPLETE: "On Complete"
ONCOMPLETELABEL: "Show on completion"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Received Submissions"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -154,8 +154,8 @@ ms_MY:
ONCOMPLETE: "Setelah lengkap"
ONCOMPLETELABEL: "Paparkan setelah lengkap"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Kiriman yang diterima"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -163,8 +163,8 @@ nl_NL:
ONCOMPLETE: "Als ingevuld"
ONCOMPLETELABEL: "Toon na invullen"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Ontvangen Verzendingen"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -163,8 +163,8 @@ pl_PL:
ONCOMPLETE: "Po uzupełnieniu"
ONCOMPLETELABEL: "Pokaż po zakończeniu"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Otrzymane Zgłoszenia"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -157,8 +157,8 @@ pt_PT:
ONCOMPLETE: "On Complete"
ONCOMPLETELABEL: "Show on completion"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Dados Recolhidos"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -163,8 +163,8 @@ ru_RU:
ONCOMPLETE: "После отправки"
ONCOMPLETELABEL: "Показать после отправки"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Получено из формы"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -149,8 +149,8 @@ sr_RS:
ONCOMPLETE: "On Complete"
ONCOMPLETELABEL: "Show on completion"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Received Submissions"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"

View File

@ -163,8 +163,8 @@ tr_TR:
ONCOMPLETE: "Tamamlanınca"
ONCOMPLETELABEL: "Tamamlanınca görüntüle"
OPTIONS: "Options"
ORSELECTAFIELDTOUSEASFROM: ".. or Select a Form Field to use as the From Address"
ORSELECTAFIELDTOUSEASTO: ".. or Select a Field to use as the To Address"
ORSELECTAFIELDTOUSEASFROM: ".. or select a field to use as reply to address"
ORSELECTAFIELDTOUSEASTO: ".. or select a field to use as the to address"
PLURALNAME: "User Defined Forms"
RECEIVED: "Alınan Gönderiler"
SAVESUBMISSIONS: "Disable Saving Submissions to Server"