mail\BaseMailer send()

send() public method Sends the given email message. This method will log a message about the email being sent. If $useFileTransport is true, it will save the email as a file under $fileTransportPath. Otherwise, it will call sendMessage() to send the email to its recipient(s). Child classes should implement sendMessage() with the actual email sending logic. public boolean send ( $message )$message yii\mail\MessageInterface Email message instance to be sent return boolean Whether the mes

mail\BaseMailer saveMessage()

saveMessage() protected method Saves the message as a file under $fileTransportPath. protected boolean saveMessage ( $message )$message yii\mail\MessageInterface return boolean Whether the message is saved successfully

mail\BaseMailer render()

render() public method Renders the specified view with optional parameters and layout. The view will be rendered using the $view component. public string render ( $view, $params = [], $layout = false )$view string The view name or the path alias of the view file. $params array The parameters (name-value pairs) that will be extracted and made available in the view file. $layout string|boolean Layout view name or path alias. If false, no layout will be applied. return string The re

mail\BaseMailer getViewPath()

getViewPath() public method public string getViewPath ( )return string The directory that contains the view files for composing mail messages Defaults to '@app/mail'.

mail\BaseMailer getView()

getView() public method public yii\web\View getView ( )return yii\web\View View instance.

mail\BaseMailer generateMessageFileName()

generateMessageFileName() public method public string generateMessageFileName ( )return string The file name for saving the message when $useFileTransport is true.

mail\BaseMailer EVENT_BEFORE_SEND

EVENT_BEFORE_SEND event of type yii\mail\MailEvent An event raised right before send. You may set yii\mail\MailEvent::$isValid to be false to cancel the send.

mail\BaseMailer EVENT_AFTER_SEND

EVENT_AFTER_SEND event of type yii\mail\MailEvent An event raised right after send.

mail\BaseMailer createView()

createView() protected method Creates view instance from given configuration. protected yii\web\View createView ( array $config )$config array View configuration. return yii\web\View View instance.

mail\BaseMailer createMessage()

createMessage() protected method Creates a new message instance. The newly created instance will be initialized with the configuration specified by $messageConfig. If the configuration does not specify a 'class', the $messageClass will be used as the class of the new message instance. protected yii\mail\MessageInterface createMessage ( )return yii\mail\MessageInterface Message instance.