Merge "Only expand `{{...}}` in messages once (part 2)"
[lhc/web/wiklou.git] / includes / mail / UserMailer.php
index 5d7afd3..f348c5b 100644 (file)
@@ -82,7 +82,8 @@ class UserMailer {
        static function makeMsgId() {
                global $wgSMTP, $wgServer;
 
-               $msgid = uniqid( wfWikiID() . ".", true ); /* true required for cygwin */
+               $domainId = WikiMap::getCurrentWikiDomain()->getId();
+               $msgid = uniqid( $domainId . ".", true /** for cygwin */ );
                if ( is_array( $wgSMTP ) && isset( $wgSMTP['IDHost'] ) && $wgSMTP['IDHost'] ) {
                        $domain = $wgSMTP['IDHost'];
                } else {
@@ -430,7 +431,7 @@ class UserMailer {
                        try {
                                foreach ( $to as $recip ) {
                                        $sent = mail(
-                                               $recip,
+                                               $recip->toString(),
                                                self::quotedPrintable( $subject ),
                                                $body,
                                                $headers,