PHPMailer::addEmbeddedImage

Advertisement

Summery Summery

Add an embedded (inline) attachment from a file.

Syntax Syntax

PHPMailer::addEmbeddedImage( string $path, string $cid, string $name = '', string $encoding = 'base64', string $type = '', string $disposition = 'inline' )

Description Description

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. Never use a user-supplied path to a file!

Parameters Parameters

$path

(Required) Path to the attachment.

$cid

(Required) Content ID of the attachment; Use this to reference the content when using an embedded image in HTML.

$name

(Optional) Overrides the attachment name.

Default value: ''

$encoding

(Optional) File encoding (see $Encoding).

Default value: 'base64'

$type

(Optional) File MIME type.

Default value: ''

$disposition

(Optional) Disposition to use

Default value: 'inline'

Return Return

(boolean) True on successfully adding an attachment

Source Source

File: wp-includes/class-phpmailer.php


			

Advertisement

Advertisement

Leave a Reply