Mail_Mime::addAttachment()

Mail_Mime::addAttachment() -- 添付を追加する

概要

require_once 'Mail/mime.php';

boolean addAttachment (string $file, string [$c_type = 'application/octet-stream'], string [$name = ''], boolean [$isfile = TRUE], string [$encoding = 'base64'])

説明

メッセージに添付を追加します。

パラメータ

返り値

boolean - 成功時には TRUE、 失敗時には PEAR_Error を返します。

例外・エラー

表 45-1PEAR_Error の値

エラーコートエラーメッセージ原因解決
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. addAttachment() does no file locking, so this problem is not caused by competitve callings of this function.

注意

この関数は、スタティックにコールする ことはできません。