Mail_Mime::setTxtBody()

Mail_Mime::setTxtBody() – プレインテキスト部分を設定する

Synopsis

require_once 'Mail/mime.php';

boolean setTxtBody ( string $data , boolean $isfile = = false )

Description

メッセージのプレインテキスト部分を設定します。

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

Possible PEAR_Error values
エラーコード エラーメッセージ 原因 解決
NULL "ファイル file_name が読み込めない" ファイルが見つからないか、 スクリプトのファイルへのアクセス権限が足りません。 ファイル名とパスを確認します。ユーザーとファイルパーミッションを確認します。
NULL "file_name を開くことができない" The file is already opened and exclusivly locked by another application. In the most cases a programm opens the file for writing. setTxtBody() does no file locking, so this problem is not caused by competitve callings of this function.

Note

This function can not be called statically.