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
| Name | Data type | Default | Remarks |
|---|---|---|---|
| $address | string | Reply-To address | |
| $name | string | null | Reply-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');