PHPMailer::addEmbeddedImage
Add an embedded (inline) attachment from a file.
This can include images, sounds, and just about any other document type. These differ from 'regular' attachments in that they are intended to be displayed inline with the message, not just attached for download. This is used in HTML messages that embed the images the HTML refers to using the $cid value.
Signature
public function addEmbeddedImage(string
$path,
string
$cid,
[string
$name = '',
[string
$encoding = 'base64',
[string
$type = '',
[string
$disposition = 'inline']]]] )
Parameters
$path
— string
Path to the attachment.$cid
— string
Content ID of the attachment; Use this to reference
the content when using an embedded image in HTML.$name
— string
Overrides the attachment name.$encoding
— string
File encoding (see $Encoding).$type
— string
File MIME type.$disposition
— string
Disposition to use
Returns
- boolean
- True on successfully adding an attachment