80 $this->
addHeader(sprintf(
'From: %s', $from));
93 if (strpos($header,
"\n") !==
false || strpos($header,
"\r") !==
false) {
94 throw new \InvalidArgumentException(
'Headers can not contain newline characters for security reasons');
120 $content = wordwrap($content, $this->maxColumnWidth);
121 $headers = ltrim(implode(
"\r\n", $this->headers) .
"\r\n",
"\r\n");
124 $headers .=
'MIME-Version: 1.0' .
"\r\n";
134 foreach ($this->
to as
$to) {
163 throw new \InvalidArgumentException(
'The content type can not contain newline characters to prevent email header injection');
178 throw new \InvalidArgumentException(
'The encoding can not contain newline characters to prevent email header injection');
setContentType($contentType)
send($content, array $records)
{}
const ERROR
Runtime errors.
getHighestRecord(array $records)
mail($to, $subject, $message, $additional_headers=null, $additional_parameters=null)
NativeMailerHandler uses the mail() function to send the emails.
addHeader($headers)
Add headers to the message.
__construct($to, $subject, $from, $level=Logger::ERROR, $bubble=true, $maxColumnWidth=70)
addParameter($parameters)
Add parameters to the message.
Create styles array
The data for the language used.
Base class for all mail handlers.