* @param $from MailAddress: sender's email
* @param $subject String: email's subject.
* @param $body String: email's text.
- * @param $replyto String: optional reply-to email (default: false).
+ * @param $replyto String: optional reply-to email (default: null).
*/
-function userMailer( $to, $from, $subject, $body, $replyto=false ) {
+function userMailer( $to, $from, $subject, $body, $replyto=null ) {
global $wgUser, $wgSMTP, $wgOutputEncoding, $wgErrorString;
if (is_array( $wgSMTP )) {
$headers['From'] = $from->toString();
$headers['To'] = $to->toString();
if ( $replyto ) {
- $headers['Reply-To'] = $replyto;
+ $headers['Reply-To'] = $replyto->toString();
}
$headers['Subject'] = wfQuotedPrintable( $subject );
$headers['Date'] = date( 'r' );
"X-Mailer: MediaWiki mailer$endl".
'From: ' . $from->toString();
if ($replyto) {
- $headers .= "{$endl}Reply-To: $replyto";
+ $headers .= "{$endl}Reply-To: " . $replyto->toString();
}
$dest = $to->toString();
$userCondition = false;
}
if( $userCondition ) {
- $dbr =& wfGetDB( DB_MASTER );
+ $dbr = wfGetDB( DB_MASTER );
$res = $dbr->select( 'watchlist', array( 'wl_user' ),
array(
if ( $wgShowUpdatedMarker || $wgEnotifWatchlist ) {
# mark the changed watch-listed page with a timestamp, so that the page is
# listed with an "updated since your last visit" icon in the watch list, ...
- $dbw =& wfGetDB( DB_MASTER );
+ $dbw = wfGetDB( DB_MASTER );
$success = $dbw->update( 'watchlist',
array( /* SET */
'wl_notificationtimestamp' => $dbw->timestamp($timestamp)
}
} else {
$from = $adminAddress;
- $replyto = $wgNoReplyAddress;
+ $replyto = new MailAddress( $wgNoReplyAddress );
}
if( $wgUser->isIP( $name ) ) {