Mail::__construct
新しいメールを作成します
説明
public Mail::__construct( [ string $subject = null, string $body = null, array $header = null ] )
引数
| 名前 | データ型 | デフォルト | 備考 |
|---|---|---|---|
| $subject | string | null | メールの件名 |
| $body | string | null | メールの本文(プレーンテキスト) |
| $header | array | null | カスタムヘッダー。Mail::pushHeaderに渡します |
例
Controller
use Fegg\Tool\Mail;
$mail = new Mail('Mail subject', 'Mail body');
// Same with
$mail = new Mail();
$mail->subject('Mail subject');
$mail->body('Mail body');