Summery Summery
Add an attachment from a path on the filesystem.
Syntax Syntax
Description Description
Never use a user-supplied path to a file! Returns false if the file could not be found or read. Explicitly does not support passing URLs; PHPMailer is not an HTTP client. If you need to do that, fetch the resource yourself and pass it in via a local file or string.
Parameters Parameters
- $path
-
(Required) Path to the attachment.
- $name
-
(Optional) Overrides the attachment name.
Default value: ''
- $encoding
-
(Optional) File encoding (see $Encoding).
Default value: 'base64'
- $type
-
(Optional) File extension (MIME) type.
Default value: ''
- $disposition
-
(Optional) Disposition to use
Default value: 'attachment'
Return Return
(boolean)
Source Source
File: wp-includes/class-phpmailer.php