public function TestingMailSystem::mail in Mail System 6
Same name and namespace in other branches
- 6.2 mailsystem.module \TestingMailSystem::mail()
Accept an e-mail message and store it in a variable.
Parameters
$message: An e-mail message.
Overrides DefaultMailSystem::mail
File
- ./
mailsystem.module, line 392 - Provide UI for controlling the mail_system variable.
Class
- TestingMailSystem
- A mail sending implementation that captures sent messages to a variable.
Code
public function mail(array $message) {
$captured_emails = variable_get('drupal_test_email_collector', array());
$captured_emails[] = $message;
variable_set('drupal_test_email_collector', $captured_emails);
return TRUE;
}