public function HTMLTestingMailSystem::format in Simplenews 8.2
Same name and namespace in other branches
- 8 src/Plugin/Mail/HTMLTestingMailSystem.php \Drupal\simplenews\Plugin\Mail\HTMLTestingMailSystem::format()
- 3.x src/Plugin/Mail/HTMLTestingMailSystem.php \Drupal\simplenews\Plugin\Mail\HTMLTestingMailSystem::format()
Implements MailSystemInterface::format().
Overrides MailInterface::format
File
- src/
Plugin/ Mail/ HTMLTestingMailSystem.php, line 25
Class
- HTMLTestingMailSystem
- A mail sending implementation that captures sent messages to a variable.
Namespace
Drupal\simplenews\Plugin\MailCode
public function format(array $message) {
// Join the body array into one string.
$message['body'] = implode("\n\n", $message['body']);
// Wrap the mail body for sending.
$message['body'] = MailFormatHelper::wrapMail($message['body']);
return $message;
}