TestMailCollector
class TestMailCollector extends PhpMail implements MailInterface (View source)
Defines a mail backend that captures sent messages in the state system.
This class is for running tests or for development.
Constants
| private MAILBOX_LIST_HEADERS |
A list of headers that can contain multiple email addresses. |
Properties
| protected ConfigFactoryInterface | $configFactory | The configuration factory. |
from PhpMail |
Methods
Concatenates and wraps the email body for plain-text mails.
Sends an email message.
Disallows potentially unsafe shell characters.
Details
__construct()
PhpMail constructor.
array
format(array $message)
Concatenates and wraps the email body for plain-text mails.
bool
mail(array $message)
Sends an email message.
static protected bool
_isShellSafe(string $string)
Disallows potentially unsafe shell characters.
Functionally similar to PHPMailer::isShellSafe() which resulted from CVE-2016-10045. Note that escapeshellarg and escapeshellcmd are inadequate for this purpose.