mail\BaseMailer $fileTransportPath

$fileTransportPath public property The directory where the email messages are saved when $useFileTransport is true. public string $fileTransportPath = '@runtime/mail'

mail\BaseMailer $fileTransportCallback

$fileTransportCallback public property A PHP callback that will be called by send() when $useFileTransport is true. The callback should return a file name which will be used to save the email message. If not set, the file name will be generated based on the current timestamp. The signature of the callback is: function ($mailer, $message) public callable $fileTransportCallback = null

log\Target setLevels()

setLevels() public method Sets the message levels that this target is interested in. The parameter can be either an array of interested level names or an integer representing the bitmap of the interested level values. Valid level names include: 'error', 'warning', 'info', 'trace' and 'profile'; valid level values include: yii\log\Logger::LEVEL_ERROR, yii\log\Logger::LEVEL_WARNING, yii\log\Logger::LEVEL_INFO, yii\log\Logger::LEVEL_TRACE and yii\log\Logger::LEVEL_PROFILE. For example, ['error

log\Target getMessagePrefix()

getMessagePrefix() public method Returns a string to be prefixed to the given message. If $prefix is configured it will return the result of the callback. The default implementation will return user IP, user ID and session ID as a prefix. public string getMessagePrefix ( $message )$message array The message being exported. The message structure follows that in yii\log\Logger::$messages. return string The prefix string

Mailing

Configuration Basic usage Composing mail content File attachment Embedding images Testing and debugging Creating your own mail solution Note: This section is under development. Yii supports composition and sending of the email messages. However, the framework core provides only the content composition functionality and basic interface. Actual mail sending mechanism should be provided by the extension, because different projects may require its different implementation and it usually depends

log\Target getLevels()

getLevels() public method public integer getLevels ( )return integer The message levels that this target is interested in. This is a bitmap of level values. Defaults to 0, meaning all available levels.

log\Target export()

export() public abstract method Exports log $messages to a specific destination. Child classes must implement this method. public abstract void export ( )

log\Target getContextMessage()

getContextMessage() protected method Generates the context information to be logged. The default implementation will dump user information, system variables, etc. protected string getContextMessage ( )return string The context information. If an empty string, it means no context information.

log\Target filterMessages()

filterMessages() public static method Filters the given messages according to their categories and levels. public static array filterMessages ( $messages, $levels = 0, $categories = [], $except = [] )$messages array Messages to be filtered. The message structure follows that in yii\log\Logger::$messages. $levels integer The message levels to filter by. This is a bitmap of level values. Value 0 means allowing all levels. $categories array The message categories to filter by. If empty,

log\Target formatMessage()

formatMessage() public method Formats a log message for display as a string. public string formatMessage ( $message )$message array The log message to be formatted. The message structure follows that in yii\log\Logger::$messages. return string The formatted message