PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

導入> <cyrus_unbind
Last updated: Fri, 04 Jul 2008

view this page in

IMAP、POP3 および NNTP

  • 導入
  • インストール/設定
  • 定義済み定数
  • IMAP 関数
    • imap_8bit — 8 ビット文字列を quoted-printable 文字列に変換する
    • imap_alerts — 発生した IMAP 警告メッセージを返す
    • imap_append — 指定されたメールボックスに文字列メッセージを追加する
    • imap_base64 — BASE64 でエンコードされたテキストをデコードする
    • imap_binary — 8 ビット文字列を base64 文字列に変換する
    • imap_body — メッセージ本文を読む
    • imap_bodystruct — 指定したメッセージの指定した body セクションの構造を読み込む
    • imap_check — 現在のメールボックスをチェックする
    • imap_clearflag_full — メッセージのフラグをクリアする
    • imap_close — IMAP ストリームをクローズする
    • imap_createmailbox — 新しいメールボックスを作る
    • imap_delete — 現在のメールボックスから削除するメッセージに印を付ける
    • imap_deletemailbox — メールボックスを削除する
    • imap_errors — 発生したすべての IMAP エラーを返す
    • imap_expunge — 削除用にマークされたすべてのメッセージを削除する
    • imap_fetch_overview — 指定したメッセージのヘッダ情報の概要を読む
    • imap_fetchbody — メッセージ本文中の特定のセクションを取り出す
    • imap_fetchheader — メッセージのヘッダを返す
    • imap_fetchstructure — 特定のメッセージの構造を読み込む
    • imap_get_quota — クオータレベルの設定、メールボックス毎の使用状況を取得する
    • imap_get_quotaroot — ユーザ単位のクォータ設定を取得する
    • imap_getacl — 与えられたメールボックスの ACL を取得する
    • imap_getmailboxes — メールボックスのリストを読み込み、各ボックスに関する詳細な情報を返す
    • imap_getsubscribed — 購読中の全メールボックスの一覧を取得する
    • imap_header — imap_headerinfo のエイリアス
    • imap_headerinfo — メッセージヘッダを読み込む
    • imap_headers — メールボックス内のすべてのメッセージのヘッダを返す
    • imap_last_error — ページリクエスト時に生じた直近の IMAP エラーを返す
    • imap_list — メールボックスのリストを読み込む
    • imap_listmailbox — imap_list のエイリアス
    • imap_listscan — 指定したテキストにマッチするメールボックスの一覧を返す
    • imap_listsubscribed — imap_lsub のエイリアス
    • imap_lsub — 購読しているすべてのメールボックスの一覧を得る
    • imap_mail_compose — 指定したエンベロープおよびボディセクションに基づいて MIME メッセージを作成する
    • imap_mail_copy — 指定されたメッセージをメールボックスにコピーする
    • imap_mail_move — 指定されたメッセージをメールボックスに移動する
    • imap_mail — e-mail メッセージを送信する
    • imap_mailboxmsginfo — 現在のメールボックスに関する情報を得る
    • imap_mime_header_decode — MIME ヘッダ要素をデコードする
    • imap_msgno — 指定した UID のメッセージ番号を返す
    • imap_num_msg — 現在のメールボックスのメッセージ数を取得する
    • imap_num_recent — 現在のメールボックスにある新規メッセージ数を取得する
    • imap_open — メールボックスへの IMAP ストリームをオープンする
    • imap_ping — IMAP ストリームがアクティブかどうかを調べる
    • imap_qprint — quoted-printable 文字列を 8 ビット文字列に変換する
    • imap_renamemailbox — メールボックスの名前を変更する
    • imap_reopen — 新規メールボックスへの IMAP ストリームを再度オープンする
    • imap_rfc822_parse_adrlist — アドレス文字列を解釈します
    • imap_rfc822_parse_headers — 文字列からメールヘッダを解釈する
    • imap_rfc822_write_address — 指定したメールボックス、ホスト、個人情報を、 電子メールアドレスとして適当な形式にして返す
    • imap_savebody — 指定した本文部をファイルに保存する
    • imap_scanmailbox — imap_listscan のエイリアス
    • imap_search — 指定した検索条件にマッチするメッセージを配列として返す
    • imap_set_quota — 指定したメールボックスにクォータを設定する
    • imap_setacl — 指定したメールボックスの ACL を設定する
    • imap_setflag_full — メッセージにフラグをセットする
    • imap_sort — メッセージヘッダの配列をソートする
    • imap_status — 現在のメールボックス以外のメールボックスのステータス情報を返す
    • imap_subscribe — メールボックスを購読する
    • imap_thread — スレッド化したメッセージのツリーを返す
    • imap_timeout — imap タイムアウトを設定あるいは取得する
    • imap_uid — 指定したメッセージシーケンス番号の UID を返す
    • imap_undelete — 削除マークがついているメッセージのマークをはずす
    • imap_unsubscribe — メールボックスの購読をやめる
    • imap_utf7_decode — 修正版 UTF-7 エンコードされた文字列をデコードする
    • imap_utf7_encode — ISO-8859-1 文字列を修正版 UTF-7 テキストに変換する
    • imap_utf8 — MIME エンコードされたテキストを UTF-8 に変換する


add a note add a note User Contributed Notes
IMAP
dickey at ascent dot co dot cc
25-Jun-2008 09:21
I noticed there are no documentations for the pop3 and smtp extensions...

anyway here is a list of pop3 commands and how I understand them:
I have tried those with * in the beginning:

pop3_undelete ($pop3_handle, $message_no)
  ->to issue RSET command. I don't know if the $message_no parameter should be there or not. I think RSET would reset all messages marked for deletion.

pop3_delete_message ($pop3_handle, $message_no)
  -> I assume it is to mark a message for deletion.

pop3_get_message ($pop3_handle, $message_no)
  -> I assume it is to issue a RETR command.

*pop3_get_message_size ($pop3_handle, $message_no)
  -> returns the size of the message. 

*pop3_get_message_header ($pop3_handle, $message_no)
  -> returns the message's headers.

pop3_get_message_sizes ($pop3_handle)
  -> Lists messages and their sizes.

pop3_get_message_ids ($pop3_handle, $message_no)
  -> Lists messages and their unique ids

*pop3_get_account_size($pop3_handle)
  -> Returns the size limit of the mail account?

*pop3_get_message_count($pop3_handle)
  -> Returns the number of messages from inbox.

*pop3_close($pop3_handle)
  -> Closes the pop3 connection.

*$pop3_handle = pop3_open($Server,$username,$password)
  -> Opens a connection to a pop3 server performs authentication and returns a handle to the pop3 connection.

Note: When you install your php you should include the pop3 extension.

Example:

$server = "tls://pop.gmail.com:995";
$username = "my_user_id@gmail.com";
$password = "mypassword";

$pop3 = pop3_open($server,$username,$password);
$message_header = pop3_get_message_header($pop3, 1);
print_r = $message_header;
pop3_close($pop3);

this code will print_r the message header of the first message. More work is needed to make the above code safe to execute.

導入> <cyrus_unbind
Last updated: Fri, 04 Jul 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites