Add a file to be attached to the email
- Multiple calls will append attachments.
- To remove the supplied attachments, specify NULL as the value.
- Attachments may or may not be supported by 3rd party WireMail modules.
$m = wireMail(); $m->to('firstname.lastname@example.org')->from('email@example.com'); $m->subject('Test attachment'); $m->body('This is just a test of a file attachment'); $m->attachment('/path/to/file.jpg'); $m->send();
// basic usage $m->attachment(string $value); // usage with all arguments $m->attachment(string $value, string $filename = '');
Full path and filename of file attachment
Optional different basename for file as it appears in the mail
Object instance it was called from (method supports fluent interface).
API reference based on ProcessWire core version 3.0.83