MediaWiki REL1_39
MediaWiki\Mail\Emailer Class Reference
Inheritance diagram for MediaWiki\Mail\Emailer:
Collaboration diagram for MediaWiki\Mail\Emailer:

Public Member Functions

 send ( $to, MailAddress $from, string $subject, string $bodyText, ?string $bodyHtml=null, array $options=[])
 

Detailed Description

Access: internal
Since
1.35

Definition at line 31 of file Emailer.php.

Member Function Documentation

◆ send()

MediaWiki\Mail\Emailer::send ( $to,
MailAddress $from,
string $subject,
string $bodyText,
?string $bodyHtml = null,
array $options = [] )
Since
1.35

This function will perform a direct (authenticated) login to a SMTP Server to use for mail relaying if 'wgSMTP' specifies an array of parameters. It requires PEAR:Mail to do that. Otherwise it just uses the standard PHP 'mail' function.

Sends emails to recipients.

Since
1.35
Parameters
MailAddress | MailAddress[]$toArray of Recipients' emails
MailAddress$fromSender's email
string$subjectEmail's subject.
string$bodyTexttext part of body
string | null$bodyHtmlhtml part of body (optional)
array$optionsKeys: 'replyTo' MailAddress 'contentType' string default 'text/plain; charset=UTF-8' 'headers' array Extra headers to set
Exceptions
MWException
Exception
Returns
StatusValue

Implements MediaWiki\Mail\IEmailer.

Definition at line 43 of file Emailer.php.


The documentation for this class was generated from the following file: