Page MenuHomeWickedGov Phorge

EmaillingJob.php
No OneTemporary

Size
881 B
Referenced Files
None
Subscribers
None

EmaillingJob.php

<?php
/**
* @license GPL-2.0-or-later
* @file
*/
namespace MediaWiki\Mail;
use MediaWiki\JobQueue\Job;
use MediaWiki\Title\Title;
/**
* Send an arbitrary single email.
*
* This is kept for backwards-compatibility.
*
* @ingroup JobQueue
*/
class EmaillingJob extends Job {
/** @var IEmailer */
private $emailer;
public function __construct( ?Title $title, array $params, IEmailer $emailer ) {
parent::__construct( 'sendMail', Title::newMainPage(), $params );
$this->emailer = $emailer;
}
/** @inheritDoc */
public function run() {
$status = $this->emailer->send(
[ $this->params['to'] ],
$this->params['from'],
$this->params['subj'],
$this->params['body'],
null,
[ 'replyTo' => $this->params['replyto'] ]
);
return $status->isOK();
}
}
/** @deprecated class alias since 1.45 */
class_alias( EmaillingJob::class, 'EmaillingJob' );

File Metadata

Mime Type
text/x-php
Expires
Oct 7 2026, 01:17 (6 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
5d/94/a9256e0746cac4903b9f3586f1c9
Default Alt Text
EmaillingJob.php (881 B)

Event Timeline