PHP Class yii\mail\BaseMessage

By default, BaseMessage::send will use the "mail" application component to send the current message. The "mail" application component should be a mailer instance implementing MailerInterface.
See also: BaseMailer
Since: 2.0
Author: Paul Klimov ([email protected])
Inheritance: extends yii\base\Object, implements yii\mail\MessageInterface
Show file Open project: yiisoft/yii2 Class Usage Examples

Public Properties

Property Type Description
$mailer the mailer instance that created this message. For independently created messages this is null.

Public Methods

Method Description
__toString ( ) : string PHP magic method that returns the string representation of this object.
send ( yii\mail\MailerInterface $mailer = null ) : boolean Sends this email message.

Method Details

__toString() public method

PHP magic method that returns the string representation of this object.
public __toString ( ) : string
return string the string representation of this object.

send() public method

Sends this email message.
public send ( yii\mail\MailerInterface $mailer = null ) : boolean
$mailer yii\mail\MailerInterface the mailer that should be used to send this message. If no mailer is given it will first check if [[mailer]] is set and if not, the "mail" application component will be used instead.
return boolean whether this message is sent successfully.

Property Details

$mailer public property

the mailer instance that created this message. For independently created messages this is null.
public $mailer