MediaWiki  1.34.0
EmaillingJob.php
Go to the documentation of this file.
1 <?php
30 class EmaillingJob extends Job {
31  function __construct( Title $title = null, array $params ) {
32  parent::__construct( 'sendMail', Title::newMainPage(), $params );
33  }
34 
35  function run() {
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 }
UserMailer\send
static send( $to, $from, $subject, $body, $options=[])
This function will perform a direct (authenticated) login to a SMTP Server to use for mail relaying i...
Definition: UserMailer.php:115
Job\$title
Title $title
Definition: Job.php:41
Title\newMainPage
static newMainPage(MessageLocalizer $localizer=null)
Create a new Title for the Main Page.
Definition: Title.php:649
Job\$params
array $params
Array of job parameters.
Definition: Job.php:35
Job
Class to both describe a background job and handle jobs.
Definition: Job.php:30
EmaillingJob\run
run()
Run the job.
Definition: EmaillingJob.php:35
EmaillingJob\__construct
__construct(Title $title=null, array $params)
Definition: EmaillingJob.php:31
Title
Represents a title within MediaWiki.
Definition: Title.php:42
$status
return $status
Definition: SyntaxHighlight.php:347
EmaillingJob
Old job used for sending single notification emails; kept for backwards-compatibility.
Definition: EmaillingJob.php:30