PHPMailer\PHPMailer\PHPMailer::addStringEmbeddedImage
Add an embedded stringified attachment.
This can include images, sounds, and just about any other document type. If your filename doesn't contain an extension, be sure to set the $type to an appropriate MIME type.
Signature
public function addStringEmbeddedImage(string
$string,
string
$cid,
[string
$name = '',
[string
$encoding = 'base64',
[string
$type = '',
[string
$disposition = 'inline']]]] )
Parameters
$string
— string- The attachment binary data
$cid
— string- Content ID of the attachment; Use this to reference
the content when using an embedded image in HTML $name
— string- A filename for the attachment. If this contains an extension,
PHPMailer will attempt to set a MIME type for the attachment.
For example 'file.jpg' would get an 'image/jpeg' MIME type. $encoding
— string- File encoding (see $Encoding), defaults to 'base64'
$type
— string- MIME type - will be used in preference to any automatically derived type
$disposition
— string- Disposition to use
Returns
- bool
- True on successfully adding an attachment