*
* @return string
*/
- static function arrayToHeaderString( $headers, $endl = PHP_EOL ) {
+ private static function arrayToHeaderString( $headers, $endl = PHP_EOL ) {
$strings = [];
foreach ( $headers as $name => $value ) {
// Prevent header injection by stripping newlines from value
*
* @return string
*/
- static function makeMsgId() {
+ private static function makeMsgId() {
global $wgSMTP, $wgServer;
- $domainId = WikiMap::getCurrentWikiDomain()->getId();
+ $domainId = WikiMap::getCurrentWikiDbDomain()->getId();
$msgid = uniqid( $domainId . ".", true /** for cygwin */ );
if ( is_array( $wgSMTP ) && isset( $wgSMTP['IDHost'] ) && $wgSMTP['IDHost'] ) {
$domain = $wgSMTP['IDHost'];
* @param MailAddress|MailAddress[] $to Recipient's email (or an array of them)
* @param MailAddress $from Sender's email
* @param string $subject Email's subject.
- * @param string $body Email's text or Array of two strings to be the text and html bodies
+ * @param string|string[] $body Email's text or Array of two strings to be the text and html bodies
* @param array $options Keys:
* 'replyTo' MailAddress
* 'contentType' string default 'text/plain; charset=UTF-8'
* @param MailAddress[] $to Array of recipients' email addresses
* @param MailAddress $from Sender's email
* @param string $subject Email's subject.
- * @param string $body Email's text or Array of two strings to be the text and html bodies
+ * @param string|string[] $body Email's text or Array of two strings to be the text and html bodies
* @param array $options Keys:
* 'replyTo' MailAddress
* 'contentType' string default 'text/plain; charset=UTF-8'
* @param int $code Error number
* @param string $string Error message
*/
- static function errorHandler( $code, $string ) {
+ private static function errorHandler( $code, $string ) {
self::$mErrorString = preg_replace( '/^mail\(\)(\s*\[.*?\])?: /', '', $string );
}