MediaWiki REL1_35
Emailer.php
Go to the documentation of this file.
1<?php
22
23use MailAddress;
24use StatusValue;
25use UserMailer;
26
31class Emailer implements IEmailer {
32
43 public function send(
44 array $to,
45 MailAddress $from,
46 string $subject,
47 string $bodyText,
48 ?string $bodyHtml = null,
49 array $options = []
50 ): StatusValue {
51 $body = $bodyHtml ? [ 'text' => $bodyText, 'html' => $bodyHtml ] : $bodyText;
52 return UserMailer::send( $to, $from, $subject, $body, $options );
53 }
54}
Stores a single person's name and email address.
send(array $to, MailAddress $from, string $subject, string $bodyText, ?string $bodyHtml=null, array $options=[])
Definition Emailer.php:43
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Collection of static functions for sending mail.
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...
Interface for sending emails.
Definition IEmailer.php:34