class TestingMailSystem in Mail System 6.2
Same name and namespace in other branches
- 6 mailsystem.module \TestingMailSystem
A mail sending implementation that captures sent messages to a variable.
This class is for running tests or for development.
Hierarchy
- class \DefaultMailSystem implements MailSystemInterface
- class \TestingMailSystem implements MailSystemInterface
Expanded class hierarchy of TestingMailSystem
File
- ./
mailsystem.module, line 642 - Provide UI for controlling the mail_system variable.
View source
class TestingMailSystem extends DefaultMailSystem implements MailSystemInterface {
/**
* Accept an e-mail message and store it in a variable.
*
* @param $message
* An e-mail message.
*/
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DefaultMailSystem:: |
public | function |
Concatenate and wrap the e-mail body for plain-text mails. Overrides MailSystemInterface:: |
|
TestingMailSystem:: |
public | function |
Accept an e-mail message and store it in a variable. Overrides DefaultMailSystem:: |