class UbercartMail in Ubercart 8.4
Modifies the Drupal mail system to send HTML emails.
Plugin annotation
@Mail(
id = "ubercart_mail",
label = @Translation("Ubercart mailer"),
description = @Translation("Sends the message as HTML, using PHP's native mail() function.")
)
Hierarchy
- class \Drupal\Core\Mail\Plugin\Mail\PhpMail implements MailInterface
- class \Drupal\uc_store\Plugin\Mail\UbercartMail
Expanded class hierarchy of UbercartMail
File
- uc_store/
src/ Plugin/ Mail/ UbercartMail.php, line 16
Namespace
Drupal\uc_store\Plugin\MailView source
class UbercartMail extends PhpMail {
/**
* Concatenates the e-mail body for HTML mails.
*
* @param array $message
* A message array, as described in hook_mail_alter().
*
* @return string
* The formatted $message.
*/
public function format(array $message) {
$message['body'] = implode("\n\n", $message['body']);
return $message;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PhpMail:: |
protected | property | The configuration factory. | |
PhpMail:: |
public | function |
Sends an email message. Overrides MailInterface:: |
2 |
PhpMail:: |
protected static | function | Disallows potentially unsafe shell characters. | |
PhpMail:: |
public | function | PhpMail constructor. | |
UbercartMail:: |
public | function |
Concatenates the e-mail body for HTML mails. Overrides PhpMail:: |