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 {
global $wgSMTP, $wgEnotifMaxRecips, $wgAdditionalMailParams;
$mime = null;
- $replyto = isset( $options['replyTo'] ) ? $options['replyTo'] : null;
- $contentType = isset( $options['contentType'] ) ?
- $options['contentType'] : 'text/plain; charset=UTF-8';
- $headers = isset( $options['headers'] ) ? $options['headers'] : [];
+ $replyto = $options['replyTo'] ?? null;
+ $contentType = $options['contentType'] ?? 'text/plain; charset=UTF-8';
+ $headers = $options['headers'] ?? [];
// Allow transformation of content, such as encrypting/signing
$error = false;
try {
foreach ( $to as $recip ) {
$sent = mail(
- $recip,
+ $recip->toString(),
self::quotedPrintable( $subject ),
$body,
$headers,