previousMail_Mime::addHTMLImage() (Previous) (Next) Mail_Mime::headers()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::get()

Mail_Mime::get() – メッセージを構築する

Synopsis

require_once 'Mail/mime.php';

string &get ( array $param = = null )

Description

text/html/image/attachment を追加した際には、この関数をコールしなければなりません。 この関数は、メッセージを構築してそれを返します。送信は行いません。この関数 (と headers() 関数) の返す内容をを送信するには、 Mail::send() 関数を使用しなければなりません。

Parameter

  • array $param - パラメータの連想配列。 これらのパラメータは、メッセージ構築時に作用します。

    • $param["text_encoding"] - 電子メールのプレインテキストパートに使用するエンコードの種類です。 デフォルトは "7bit" です。

    • $param["html_encoding"] - 電子メールの HTML パートに使用するエンコードの種類です。

    • $param["7bit_wrap"] - テキストが終わる文字数です。 SMTP は、CRLF を含む 1000 文字を最大行の長さと規定します。 デフォルトは 998 文字です (CRLF を追加して 1000 文字になります)。

    • $param["head_charset"] - ヘッダに使用する文字コードセットです。デフォルトは "iso-8859-1" です。

    • $param["text_charset"] - 電子メールのプレインテキストパートに使用する文字コードセットです。 デフォルトは "iso-8859-1" です。

    • $param["html_charset"] - 電子メールの HTML パートに使用する文字コードセットです。 デフォルトは "iso-8859-1" です。

Return value

string - メッセージ本文です。

Note

This function can not be called statically.

Mail_Mime::get() は、 Mail_Mime::headers() より先にコールしなければなりません。

previousMail_Mime::addHTMLImage() (Previous) (Next) Mail_Mime::headers()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:
Note by: justinasu@gmail.com
I noticed that get method does not encode the built message in the specified encoding.

if you set transfer encoding and html encoding the returned body is unencoded in say 7bit encoding.
Note by: kguest
this must be called before the headers() method