メインコンテンツまでスキップ
Version: Fegg 5.x(開発版)

Mail::setReplyTo

Add a Reply-To address

Description​

public self Mail::setReplyTo( string $address, [ string $name = null ] )

Each call adds one more Reply-To address. Use Mail::clearReplyTo to remove them.

Arguments​

NameData typeDefaultRemarks
$addressstringReply-To address
$namestringnullReply-To name

Example​

Controller
use Fegg\Tool\Mail;

$mail = new Mail('Mail subject', 'Mail body');
$mail->setReplyTo($this->in('mail'), $this->in('name'));
$mail->send('admin@example.com', 'Contact form', 'noreply@example.com');