wireMail() function 
Send an email or get a WireMail object to populate before send
- Please note that the order of arguments is different from PHP’s mail() function.
- If no arguments are specified it simply returns a WireMail object (see #4 below).
- This is a procedural version of functions provided by the $mailAPI variable (see that for more options).
- This function will attempt to use an installed module that extends WireMail.
- If no other WireMail module is installed, the default WireMail(which uses PHP mail) will be used instead.
// Default usage:
wireMail($to, $from, $subject, $body, $options);
// Specify body and/or bodyHTML in $options array (perhaps with other options):
$options = [ 'body' => $body, 'bodyHTML' => $bodyHTML ];
wireMail($to, $from, $subject, $options);
// Specify both $body and $bodyHTML as arguments, but no $options:
wireMail($to, $from, $subject, $body, $bodyHTML);
// Specify a blank call to wireMail() to get the WireMail sending object. This can
// be either WireMail() or a class descending from it. If a WireMail descending
// module is installed, it will be returned rather than WireMail():
$mail = wireMail();
$mail->to('user
*Please note this method is  and thus not intended to be called directly.*     Internal usage
// basic internal usage
$int = wireMail ();
// internal usage with all arguments
$int = wireMail ($to = '', string $from = '', string $subject = '', $body = '', $options = array);Arguments
| Name | Type(s) | Description | 
|---|---|---|
| $to(optional) | stringarray | Email address TO. For multiple, specify CSV string or array. | 
| $from(optional) | string | Email address FROM. This may be an email address, or a combined name and email address. Example of combined name and email: `Karen Cramer <karen | 
| $subject(optional) | string | Email subject | 
| $body(optional) | stringarray | Email body or omit to move straight to $options array | 
| $options(optional) | arraystring | Array of options OR the $bodyHTML string. Array $options are: 
 | 
Return value
Functions methods and properties
API reference based on ProcessWire core version 3.0.252