boolean addHTMLImage (
$c_type = 'application/octet-stream'
string $name = ''
If sending an HTML message with embedded images, use this function to add the image.
string $file- The image file name or the image data itself
string $c_type- The content type of the image or file.
string $name- The filename of the image. Only used, if
$filecontains the image data.
boolean $isfile- Whether
$fileis a filename or not.
string $content_id- The Content-ID value to use for the embedded image. A NULL value will generate a suitably unique Content-ID. When referencing the embedded image with an <img> tag, set the "src" attribute to be "cid:whatever", where "whatever" is the Content-ID.
boolean - Returns TRUE on success,
PEAR_Error on failure.
|Error code||Error message||Reason||Solution|
"File is not readable
||The file was not found or the script has not enough rights to access the file.||Check the file name and path. Check user and file permissions.|
"Could not open
||The file is already opened and exclusivly locked by another application.||In the most cases a programm opens the file for writing. addHTMLImage() does no file locking, so this problem is not caused by competitve callings of this function.|
This function can not be called statically.