\Monolog\HandlerNativeMailerHandler

NativeMailerHandler uses the mail() function to send the emails

Classes extending it should (in most cases) only implement write($record)

Summary

Methods
Properties
Constants
handleBatch()
handle()
__construct()
isHandling()
close()
pushProcessor()
popProcessor()
setFormatter()
getFormatter()
setLevel()
getLevel()
setBubble()
getBubble()
__destruct()
No public properties found
No constants found
send()
write()
processRecord()
getDefaultFormatter()
$level
$bubble
$formatter
$processors
$to
$subject
$headers
N/A
No private methods found
No private properties found
N/A

Properties

$level

$level : 

Type

$bubble

$bubble : 

Type

$processors

$processors : 

Type

$to

$to : 

Type

$subject

$subject : 

Type

$headers

$headers : 

Type

Methods

handleBatch()

handleBatch(array  $records) 

Handles a set of records at once.

Parameters

array $records

The records to handle (an array of record arrays)

handle()

handle(array  $record) 

{@inheritdoc}

Parameters

array $record

__construct()

__construct(string  $to, string  $subject, string  $from, integer  $level = \Monolog\Logger::ERROR, Boolean  $bubble = true) 

Parameters

string $to

The receiver of the mail

string $subject

The subject of the mail

string $from

The sender of the mail

integer $level

The minimum logging level at which this handler will be triggered

Boolean $bubble

Whether the messages that are handled can bubble up the stack or not

isHandling()

isHandling(array  $record) : Boolean

Checks whether the given record will be handled by this handler.

This is mostly done for performance reasons, to avoid calling processors for nothing.

Parameters

array $record

Returns

Boolean

close()

close() 

Closes the handler.

This will be called automatically when the object is destroyed

pushProcessor()

pushProcessor(callable  $callback) 

Adds a processor in the stack.

Parameters

callable $callback

popProcessor()

popProcessor() : callable

Removes the processor on top of the stack and returns it.

Returns

callable

setLevel()

setLevel(integer  $level) 

Sets minimum logging level at which this handler will be triggered.

Parameters

integer $level

getLevel()

getLevel() : integer

Gets minimum logging level at which this handler will be triggered.

Returns

integer

setBubble()

setBubble(Boolean  $bubble) 

Sets the bubbling behavior.

Parameters

Boolean $bubble

True means that bubbling is not permitted. False means that this handler allows bubbling.

getBubble()

getBubble() : Boolean

Gets the bubbling behavior.

Returns

Boolean —

True means that bubbling is not permitted. False means that this handler allows bubbling.

__destruct()

__destruct() 

send()

send(string  $content) 

Send a mail with the given content

Parameters

string $content

write()

write(array  $record) : void

Writes the record down to the log of the implementing handler

Parameters

array $record

processRecord()

processRecord(array  $record) : array

Processes a record.

Parameters

array $record

Returns

array