diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-02-10 20:57:16 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-02-10 21:00:36 +0100 |
commit | 94a4f597ff8aee0b79e51c9093452a1a2b6b7290 (patch) | |
tree | 75082bab0000c07452abef170750eb4d2655c8aa | |
parent | 16c3a86193013efd604e4fe4c7ab225c3f65be87 (diff) | |
download | aur-94a4f597ff8aee0b79e51c9093452a1a2b6b7290.tar.gz aur-94a4f597ff8aee0b79e51c9093452a1a2b6b7290.tar.xz |
Set Content-type header when sending UTF-8 mails
Fixes FS#38568.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r-- | web/lib/acctfuncs.inc.php | 4 | ||||
-rw-r--r-- | web/lib/pkgfuncs.inc.php | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index 2b7cc7a3..312f11bc 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -652,7 +652,9 @@ function send_resetkey($email, $body) { $body .= "\n\n". "{$AUR_LOCATION}/" . get_uri('/passreset/') . "?". "resetkey={$resetkey}"; - $headers = "Reply-to: nobody@archlinux.org\r\n" . + $headers = "MIME-Version: 1.0\r\n" . + "Content-type: text/plain; charset=UTF-8\r\n"; + "Reply-to: nobody@archlinux.org\r\n" . "From: aur-notify@archlinux.org\r\n" . "X-Mailer: PHP\r\n" . "X-MimeOLE: Produced By AUR"; diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index e90d5634..47b8b6a2 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -295,7 +295,9 @@ function add_package_comment($pkgid, $uid, $comment) { . "\n\n---\nIf you no longer wish to receive notifications about this package, please go the the above package page and click the UnNotify button."; $body = wordwrap($body, 70); $bcc = implode(', ', $bcc); - $headers = "Bcc: $bcc\r\n" . + $headers = "MIME-Version: 1.0\r\n" . + "Content-type: text/plain; charset=UTF-8\r\n" . + "Bcc: $bcc\r\n" . "Reply-to: nobody@archlinux.org\r\n" . "From: aur-notify@archlinux.org\r\n" . "X-Mailer: AUR"; @@ -800,7 +802,9 @@ function pkg_flag($atype, $ids) { while ($row = $result->fetch(PDO::FETCH_ASSOC)) { $body = "Your package " . $row['Name'] . " has been flagged out of date by " . $f_name . " [1]. You may view your package at:\n" . $AUR_LOCATION . get_pkg_uri($row['Name']) . "\n\n[1] - " . $AUR_LOCATION . get_user_uri($f_name); $body = wordwrap($body, 70); - $headers = "Reply-to: nobody@archlinux.org\r\n" . + $headers = "MIME-Version: 1.0\r\n" . + "Content-type: text/plain; charset=UTF-8\r\n" . + "Reply-to: nobody@archlinux.org\r\n" . "From: aur-notify@archlinux.org\r\n" . "X-Mailer: PHP\r\n" . "X-MimeOLE: Produced By AUR"; @@ -909,7 +913,9 @@ function pkg_delete ($atype, $ids, $mergepkgid) { } $body = wordwrap($body, 70); $bcc = implode(', ', $bcc); - $headers = "Bcc: $bcc\r\n" . + $headers = "MIME-Version: 1.0\r\n" . + "Content-type: text/plain; charset=UTF-8\r\n" . + "Bcc: $bcc\r\n" . "Reply-to: nobody@archlinux.org\r\n" . "From: aur-notify@archlinux.org\r\n" . "X-Mailer: AUR"; |