PHPMailer\PHPMailer\PHPMailer::addAttachment
Add an attachment from a path on the filesystem.
Never use a user-supplied path to a file! Returns false if the file could not be found or read.
Signature
public function addAttachment(string
$path,
[string
$name = '',
[string
$encoding = 'base64',
[string
$type = '',
[string
$disposition = 'attachment']]]] )
Parameters
$path
— string- Path to the attachment
$name
— string- Overrides the attachment name
$encoding
— string- File encoding (see $Encoding)
$type
— string- File extension (MIME) type
$disposition
— string- Disposition to use
Returns
- bool