UbercartMail.php in Ubercart 8.4
Namespace
Drupal\uc_store\Plugin\MailFile
uc_store/src/Plugin/Mail/UbercartMail.phpView source
<?php
namespace Drupal\uc_store\Plugin\Mail;
use Drupal\Core\Mail\Plugin\Mail\PhpMail;
/**
* Modifies the Drupal mail system to send HTML emails.
*
* @Mail(
* id = "ubercart_mail",
* label = @Translation("Ubercart mailer"),
* description = @Translation("Sends the message as HTML, using PHP's native mail() function.")
* )
*/
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;
}
}
Classes
Name | Description |
---|---|
UbercartMail | Modifies the Drupal mail system to send HTML emails. |