メインコンテンツまでスキップ

Mail::sendWithFile

Send email with attachment file

メモ

If there is no any attachment file, this method will call Mail::send automatically

メモ

If debug flag is enabled, this method will call Mail::log automatically

Description

public self Mail::sendWithFile( string $to, [ string $from_name = null, string $from_ad = null ] )

Arguments

NameData typeDefaultRemarks
$tostringSend email address
$from_namestringnullSender name
$from_adstringnullSender address

Example

Controller
$mail = $this->getClass('Tool/Mail');
$mail->subject('Mail subject');
$mail->body('Mail body');

$mail->sendWithFile('mail@example.com', 'John Doe', 'from@example.com');