Mime emails should be sent with UTF-8 charset
authorbsitu <bsitu@wikimedia.org>
Wed, 3 Jul 2013 00:32:26 +0000 (17:32 -0700)
committerbsitu <bsitu@wikimedia.org>
Wed, 3 Jul 2013 00:32:26 +0000 (17:32 -0700)
Change-Id: Ifa3d14340b163ce09363c6b9956aee5c7522e6a3

includes/UserMailer.php

index 8e3f048..52eb752 100644 (file)
@@ -267,7 +267,7 @@ class UserMailer {
                                        $body['text'] = str_replace( "\n", "\r\n", $body['text'] );
                                        $body['html'] = str_replace( "\n", "\r\n", $body['html'] );
                                }
-                               $mime = new Mail_mime( array( 'eol' => $endl ) );
+                               $mime = new Mail_mime( array( 'eol' => $endl, 'text_charset' => 'UTF-8', 'html_charset' => 'UTF-8' ) );
                                $mime->setTXTBody( $body['text'] );
                                $mime->setHTMLBody( $body['html'] );
                                $body = $mime->get(); // must call get() before headers()