Return new WireMail instance populated with “to” email
Available since version 3.0.113.
Usage
// basic usage
$wireMail = $mail->to($email);
// usage with all arguments
$wireMail = $mail->to($email, string $name = null);
Arguments
Name | Type(s) | Description |
---|---|---|
email | string, array | Email to send to–specify any one of the following:
|
name (optional) | string | An optional TO name, applies only if your $email argument was just an email address. |
Return value
Exceptions
Method can throw exceptions on error:
WireException
- if given invalid email address
API reference based on ProcessWire core version 3.0.236