MediaWiki
REL1_40
EmaillingJob.php
Go to the documentation of this file.
1
<?php
21
use
MediaWiki\Title\Title
;
22
30
class
EmaillingJob
extends
Job
{
31
public
function
__construct
( ?
Title
$title
, array $params ) {
32
parent::__construct(
'sendMail'
, Title::newMainPage(), $params );
33
}
34
35
public
function
run
() {
36
$status = UserMailer::send(
37
$this->params[
'to'
],
38
$this->params[
'from'
],
39
$this->params[
'subj'
],
40
$this->params[
'body'
],
41
[
'replyTo'
=> $this->params[
'replyto'
] ]
42
);
43
44
return
$status->isOK();
45
}
46
}
EmaillingJob
Send an arbitrary single email.
Definition
EmaillingJob.php:30
EmaillingJob\__construct
__construct(?Title $title, array $params)
Definition
EmaillingJob.php:31
EmaillingJob\run
run()
Run the job.
Definition
EmaillingJob.php:35
Job
Class to both describe a background job and handle jobs.
Definition
Job.php:39
MediaWiki\Title\Title
Represents a title within MediaWiki.
Definition
Title.php:82
$title
$title
Definition
testCompression.php:39
includes
jobqueue
jobs
EmaillingJob.php
Generated on Thu Jun 27 2024 14:03:00 for MediaWiki by
1.10.0