PHPMailer::addStringEmbeddedImage

Advertisement

Summery Summery

Add an embedded stringified attachment.

Syntax Syntax

PHPMailer::addStringEmbeddedImage( string $string, 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. Be sure to set the $type to an image type for images: JPEG images use ‘image/jpeg’, GIF uses ‘image/gif’, PNG uses ‘image/png’.

Parameters Parameters

$string

(Required) The attachment binary data.

$cid

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

$name

(Optional)

Default value: ''

$encoding

(Optional) File encoding (see $Encoding).

Default value: 'base64'

$type

(Optional) 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