Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17194 программиста и 1833 робота. Сейчас ищут 1737 программистов ...
Mail_Mime::setHTMLBody()
Вернуться к: Mail_Mime
Mail_Mime::setHTMLBody()
Mail_Mime::setHTMLBody() – set HTML part
Synopsis
require_once 'Mail/mime.php';
boolean setHTMLBody ( string $data , boolean $isfile = false )
Sets the HTML part of a message
Parameter
-
string $data - The text to set or, if $isfile is TRUE a valid filename. An URL as argument is not allowed.
-
boolean $isfile - If TRUE, the content of given file $data is used as message text.
Return value
boolean - Returns TRUE on success, PEAR_Error on failure.
Throws
Error code | Error message | Reason | Solution |
---|---|---|---|
NULL | "File is not readable file_name" | 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. |
NULL | "Could not open file_name" | The file is already opened and exclusivly locked by another application. | In the most cases a programm opens the file for writing. setHTMLBody() does no file locking, so this problem is not caused by competitve callings of this function. |
Note
This function can not be called statically.
Вернуться к: Mail_Mime