previousMail_Mime::Mail_Mime() (Previous) (Next) Mail_Mime::addHTMLImage()next

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Mail_Mime::addAttachment()

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

Synopsis

require_once 'Mail/mime.php';

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

Description

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

Parameter

  • string $file - ファイル名あるいはデータ自体です。

  • string $c_type - イメージまたは画像のコンテントタイプ。

  • string $name - データのためにファイル名を示唆します。 $file の内容がデータだった場合のみ使用します。

  • boolean $isfile - $file がファイル名かどうかです。

  • string $encoding - ファイルのデータを転送するための符号化の種類です。 デフォルトは "base64" です。 テキストベースのファイル(例えばスクリプトや HTML)には "quoted-printable" が利用出来るかもしれません (訳注:日本語のテキストは通常 "base64" を使用します)。

Return value

boolean - Returns TRUE on success, PEAR_Error on failure.

Throws

Possible PEAR_Error values
エラーコート エラーメッセージ 原因 解決
NULL "File is not readable file_name " ファイルが見つからないか、 スクリプトのファイルへのアクセス権限が足りません。 ファイル名とパスを確認します。ユーザーとファイルパーミッションを確認します。
NULL "Could not open file_name " ファイルが既にオープンされており、 他のアプリケーションによってロックされています。 たいていの場合は、プログラムはファイルを書き込みモードでオープンします。 addAttachment() はファイルのロックを行いません。 つまりこのエラーの原因は、この関数自体のコールの競合ではありません。

Note

This function can not be called statically.

previousMail_Mime::Mail_Mime() (Previous) (Next) Mail_Mime::addHTMLImage()next

Download Documentation Last updated: Sun, 21 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.