From 491e5363a783be187242bbc7a6ea95c25dd42f31 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Fri, 5 Mar 2010 07:13:00 +0000 Subject: [PATCH] - set correct html-linebreaks when sending e-mails - disallow email-add form when no (email-)domain is added yet --- admin_customers.php | 3 +-- customer_email.php | 4 ++-- index.php | 2 +- lng/english.lng.php | 4 ++++ lng/german.lng.php | 4 ++++ templates/customer/email/emails_add.tpl | 28 +++++++++++++++---------- 6 files changed, 29 insertions(+), 16 deletions(-) diff --git a/admin_customers.php b/admin_customers.php index b2725d85..6e8361f7 100644 --- a/admin_customers.php +++ b/admin_customers.php @@ -624,10 +624,9 @@ if($page == 'customers' $_mailerror = false; try { - $mail->SetFrom($this->settings['ticket']['noreply_email'], $this->settings['ticket']['noreply_name']); $mail->Subject = $mail_subject; $mail->AltBody = $mail_body; - $mail->MsgHTML($mail_body); + $mail->MsgHTML(str_replace("\n", "
", $mail_body)); $mail->AddAddress($email, getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company))); $mail->Send(); } catch(phpmailerException $e) { diff --git a/customer_email.php b/customer_email.php index c3bafb9d..e7f91a81 100644 --- a/customer_email.php +++ b/customer_email.php @@ -433,7 +433,7 @@ elseif($page == 'accounts') $mail->SetFrom($admin['email'], getCorrectUserSalutation($admin)); $mail->Subject = $mail_subject; $mail->AltBody = $mail_body; - $mail->MsgHTML($mail_body); + $mail->MsgHTML(str_replace("\n", "
", $mail_body)); $mail->AddAddress($email_full, getCorrectUserSalutation($userinfo)); $mail->Send(); } catch(phpmailerException $e) { @@ -464,7 +464,7 @@ elseif($page == 'accounts') $mail->SetFrom($admin['email'], getCorrectUserSalutation($admin)); $mail->Subject = $mail_subject; $mail->AltBody = $mail_body; - $mail->MsgHTML($mail_body); + $mail->MsgHTML(str_replace("\n", "
", $mail_body)); $mail->AddAddress($idna_convert->encode($alternative_email), getCorrectUserSalutation($userinfo)); $mail->Send(); } catch(phpmailerException $e) { diff --git a/index.php b/index.php index c7d73b1f..7ede8a99 100644 --- a/index.php +++ b/index.php @@ -263,7 +263,7 @@ if($action == 'forgotpwd') try { $mail->Subject = $lng['pwdreminder']['subject']; $mail->AltBody = $body; - $mail->MsgHTML($body); + $mail->MsgHTML(str_replace("\\n", "
", $body)); $mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']); $mail->Send(); } catch(phpmailerException $e) { diff --git a/lng/english.lng.php b/lng/english.lng.php index 74910359..0b6969c0 100644 --- a/lng/english.lng.php +++ b/lng/english.lng.php @@ -1300,4 +1300,8 @@ $lng['admin']['servicedata'] = 'Service Data'; $lng['admin']['newerversionavailable'] = 'There is a newer version of Froxlor available'; +// ADDED IN FROXLOR 0.9.3 + +$lng['emails']['noemaildomainaddedyet'] = 'You do not have a (email-)domain in your account yet.'; + ?> diff --git a/lng/german.lng.php b/lng/german.lng.php index a1a8f6f8..b0ec91d9 100644 --- a/lng/german.lng.php +++ b/lng/german.lng.php @@ -1280,4 +1280,8 @@ $lng['admin']['servicedata'] = 'Dienstleistungsdaten'; $lng['admin']['newerversionavailable'] = 'Eine neuere Version von Froxlor wurde veröffentlicht'; +// ADDED IN FROXLOR 0.9.3 + +$lng['emails']['noemaildomainaddedyet'] = 'Sie haben bisher noch keine (E-Mail-)Domain in Ihrem Konto.'; + ?> diff --git a/templates/customer/email/emails_add.tpl b/templates/customer/email/emails_add.tpl index 8203551d..43460a35 100644 --- a/templates/customer/email/emails_add.tpl +++ b/templates/customer/email/emails_add.tpl @@ -7,17 +7,23 @@ $header  {$lng['emails']['emails_add']} - - {$lng['emails']['emailaddress']}: - @ - - - {$lng['emails']['iscatchall']} - $iscatchall - - - - + + + {$lng['emails']['emailaddress']}: + @ + + + {$lng['emails']['iscatchall']} + $iscatchall + + + + + + {$lng['emails']['noemaildomainaddedyet']} + +