Summery Summery

Add a string or binary attachment (non-filesystem).

Syntax Syntax

PHPMailer::addStringAttachment( string $string, string $filename, string $encoding = 'base64', string $type = '', string $disposition = 'attachment' )

Description Description

This method can be used to attach ascii or binary data, such as a BLOB record from a database.

Parameters Parameters


(string) (Required) String attachment data.


(string) (Required) Name of the attachment.


(string) (Optional) File encoding (see $Encoding).

Default value: 'base64'


(string) (Optional) File extension (MIME) type.

Default value: ''


(string) (Optional) Disposition to use

Default value: 'attachment'

Return Return


Source Source

File: wp-includes/class-phpmailer.php




Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.