|
MediaWiki master
|
Send arbitrary emails. More...
Inherits MediaWiki\Mail\IEmailer.

Public Member Functions | |
| send ( $to, MailAddress $from, string $subject, string $bodyText, ?string $bodyHtml=null, array $options=[]) | |
| This function will perform a direct (authenticated) login to a SMTP Server to use for mail relaying if 'wgSMTP' specifies an array of parameters. | |
Send arbitrary emails.
Obtain an instance via ServiceWiring. This service is intended to eventually replace the stable (but static) functions of the UserMailer class.
Use of this class is discouraged in favour of higher-level abstractions whenever possible:
Definition at line 26 of file Emailer.php.
| MediaWiki\Mail\Emailer::send | ( | $to, | |
| MailAddress | $from, | ||
| string | $subject, | ||
| string | $bodyText, | ||
| ?string | $bodyHtml = null, | ||
| array | $options = [] ) |
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 uses symfony/mailer to do that. Otherwise it just uses the standard PHP 'mail' function.
Sends emails to recipients.
| MailAddress | MailAddress[] | $to | Array of Recipients' emails |
| MailAddress | $from | Sender's email |
| string | $subject | Email's subject. |
| string | $bodyText | text part of body |
| string | null | $bodyHtml | html part of body (optional) |
| array | $options | Keys: 'replyTo' MailAddress 'contentType' string default 'text/plain; charset=UTF-8' 'headers' array Extra headers to set |
Implements MediaWiki\Mail\IEmailer.
Definition at line 36 of file Emailer.php.