Class yii\mail\MailEvent

继承yii\mail\MailEvent » yii\base\Event » yii\base\BaseObject
实现yii\base\Configurable
可用自版本2.0
源代码 https://github.com/yiisoft/yii2/blob/master/framework/mail/MailEvent.php

MailEvent represents the event parameter used for events triggered by yii\mail\BaseMailer.

By setting the $isValid property, one may control whether to continue running the action.

公共属性

隐藏继承的属性

属性类型描述定义在
$data mixed The data that is passed to yii\base\Component::on() when attaching an event handler. yii\base\Event
$handled boolean Whether the event is handled. yii\base\Event
$isSuccessful boolean If message was sent successfully. yii\mail\MailEvent
$isValid boolean Whether to continue sending an email. yii\mail\MailEvent
$message yii\mail\MessageInterface The mail message being send. yii\mail\MailEvent
$name string The event name. yii\base\Event
$sender object The sender of this event. yii\base\Event

公共方法

隐藏继承的方法

方法描述定义在
__call() 调用不是类方法的已命名方法. yii\base\BaseObject
__construct() 构造函数. yii\base\BaseObject
__get() 返回对象属性的值. yii\base\BaseObject
__isset() 检查属性是否已设置, 即已定义且不为null. yii\base\BaseObject
__set() 设置对象属性的值. yii\base\BaseObject
__unset() 将对象属性设置为null. yii\base\BaseObject
canGetProperty() 返回一个值, 指示属性是否可读. yii\base\BaseObject
canSetProperty() 返回一个值, 指示属性是否可写. yii\base\BaseObject
className() 返回此类的完全限定名称. yii\base\BaseObject
hasHandlers() Returns a value indicating whether there is any handler attached to the specified class-level event. yii\base\Event
hasMethod() 返回一个值, 指示方法是否已定义. yii\base\BaseObject
hasProperty() 返回一个值, 指示属性是否已定义. yii\base\BaseObject
init() 初始化对象. yii\base\BaseObject
off() Detaches an event handler from a class-level event. yii\base\Event
offAll() Detaches all registered class-level event handlers. yii\base\Event
on() Attaches an event handler to a class-level event. yii\base\Event
trigger() Triggers a class-level event. yii\base\Event

属性详情

$isSuccessful public 属性

If message was sent successfully.

public boolean $isSuccessful null
$isValid public 属性

Whether to continue sending an email. Event handlers of yii\mail\BaseMailer::EVENT_BEFORE_SEND may set this property to decide whether to continue send or not.

public boolean $isValid true
$message public 属性

The mail message being send.