|
|
@ -92,7 +92,6 @@ Yii 允许通过特殊的视图文件来撰写实际的邮件内容。默认情 |
|
|
|
use yii\helpers\Html; |
|
|
|
use yii\helpers\Html; |
|
|
|
use yii\helpers\Url; |
|
|
|
use yii\helpers\Url; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* @var $this \yii\web\View view component instance */ |
|
|
|
/* @var $this \yii\web\View view component instance */ |
|
|
|
/* @var $message \yii\mail\BaseMessage instance of newly created mail message */ |
|
|
|
/* @var $message \yii\mail\BaseMessage instance of newly created mail message */ |
|
|
|
|
|
|
|
|
|
|
@ -187,7 +186,7 @@ $message->attachContent('Attachment content', ['fileName' => 'attach.txt', 'cont |
|
|
|
--------- |
|
|
|
--------- |
|
|
|
|
|
|
|
|
|
|
|
你可以使用 `embed()` 方法将图片插入到邮件内容。 |
|
|
|
你可以使用 `embed()` 方法将图片插入到邮件内容。 |
|
|
|
此方法返回会图片 ID ,这将用在 "img" 标签中。 |
|
|
|
此方法返回会图片 ID ,这将用在“img”标签中。 |
|
|
|
当通过视图文件来写信时,这种方法易于使用: |
|
|
|
当通过视图文件来写信时,这种方法易于使用: |
|
|
|
|
|
|
|
|
|
|
|
```php |
|
|
|
```php |
|
|
|