メインコンテンツまでスキップ
Version: Fegg 5.x

Mail::__construct

新しいメールを作成します

説明​

public Mail::__construct( [ string $subject = null, string $body = null, array $header = null ] )

引数​

名前データ型デフォルト備考
$subjectstringnullメールの件名
$bodystringnullメールの本文(プレーンテキスト)
$headerarraynullカスタムヘッダー。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');