1 | <?php |
||
45 | class EmailTarget extends Target |
||
46 | { |
||
47 | /** |
||
48 | * @var array the configuration array for creating a [[\yii\mail\MessageInterface|message]] object. |
||
49 | * Note that the "to" option must be set, which specifies the destination email address(es). |
||
50 | */ |
||
51 | public $message = []; |
||
52 | /** |
||
53 | * @var MailerInterface|array|string the mailer object or the application component ID of the mailer object. |
||
54 | * After the EmailTarget object is created, if you want to change this property, you should only assign it |
||
55 | * with a mailer object. |
||
56 | * Starting from version 2.0.2, this can also be a configuration array for creating the object. |
||
57 | */ |
||
58 | public $mailer = 'mailer'; |
||
59 | |||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | 2 | public function init() |
|
72 | |||
73 | /** |
||
74 | * Sends log messages to specified email addresses. |
||
75 | * Starting from version 2.0.14, this method throws LogRuntimeException in case the log can not be exported. |
||
76 | * @throws LogRuntimeException |
||
77 | */ |
||
78 | 3 | public function export() |
|
92 | |||
93 | /** |
||
94 | * Composes a mail message with the given body content. |
||
95 | * @param string $body the body content |
||
96 | * @return \yii\mail\MessageInterface $message |
||
97 | */ |
||
98 | 2 | protected function composeMessage($body) |
|
106 | } |
||
107 |