What does IMAP mean, PHP IMAP function _php Tutorial

Source: Internet
Author: User
Tags imap
The full name of IMAP is the Internet Message Access Protocol, a multi-mailbox e-mail system that was developed by Stanford University (Stanford University) in 1986, as an internetwork information access protocol. PHP provides functionality that is an IMAP 4 system, which is implemented according to RFC 1730. More information about IMAP can be found in the official IMAP website http://www.imap.org.

To use IMAP's e-mail features, first go to Ftp://ftp.cac.washington.edu/imap to download the IMAP client program. After the compilation is complete, copy the C-CLIENT/C-CLIENT.A to/usr/local/lib and copy the C-client/rfc822.h, Mail.h, and linkage.h three files to/usr/local/include. The option to add –with-imap after compiling the PHP program.

Imap_append: Appends the string to the specified mailbox.
IMAP_BASE64: Solution base64 encoding.
Imap_body: Read the letter in the text.
Imap_check: Returns the mailbox information.
Imap_close: Turn off IMAP links.
Imap_createmailbox: Create a new mailbox.
Imap_delete: Flag to delete the message.
Imap_deletemailbox: Delete existing mailboxes.
Imap_expunge: Delete flagged messages.
Imap_fetchbody: Removes the specified part from the letter text.
Imap_fetchstructure: Gets the structure information of a letter.
Imap_header: Gets the header information for a letter.
Imap_headers: Gets header information for all letters.
Imap_listmailbox: Gets the mailbox list.
Imap_listsubscribed: Gets the subscription mailbox list.
Imap_mail_copy: Copies the specified letter to its mailbox.
Imap_mail_move: Move the specified letter to its mailbox.
IMAP_NUM_MSG: Number of letters obtained.
Imap_num_recent: The number of new incoming letters is obtained.
Imap_open: Open the IMAP link.
Imap_ping: Check if IMAP is connected.
Imap_renamemailbox: Change the name of the mailbox.
Imap_reopen: Re-open the IMAP link.
Imap_subscribe: Subscribe to the mailbox.
Imap_undelete: Cancels the deletion of the message flag.
Imap_unsubscribe: Unsubscribe from the mailbox.
Imap_qprint: Converts the QP encoding to eight bits.
Imap_8bit: Converts eight bits into QP encoded.
Imap_binary: Converts eight bits to base64 encoding.
Imap_scanmailbox: Search for letters with or without a specific string.
Imap_mailboxmsginfo: Get the current mailbox information.
Imap_rfc822_write_address: E-mail address standardization.
Imap_rfc822_parse_adrlist: Resolves e-mail addresses.
Imap_setflag_full: Configure letter flags.
Imap_clearflag_full: Clear Letter flag.
Imap_sort: Sorts the letter headers.
Imap_fetchheader: Gets the original header.
Imap_uid: Obtain the letter uid.
Imap_getmailboxes: Get full details of the letter.
Imap_getsubscribed: Lists all subscribed mailboxes.
Imap_msgno: A sequential letter listing the UID.
Imap_search: Search for a letter of the specified standard.
Imap_last_error: The last error message.
Imap_errors: All error messages.
Imap_alerts: All the warning messages.
Imap_status: Current status information.

Imap_append
Attaches a string to the specified mailbox.
Syntax: int imap_append (int imap_stream, string mbox, String message, string [flags]);
return value: Integer
Function Type: Network system
Description: This function adds additional strings to the specified e-mail address. The parameter imap_stream is the code name of the IMAP. The parameter mbox is the address of the e-mail address. The parameter message is the information that you want to attach. Parameter flag is a flag that can be omitted, indicating the flag value of the e-mail address. Note that when communicating with a Cyrus IMAP server, you should use \ r \ n as the line ending character (End-of-line, EOL). Returns the false value if there is an error.

Imap_base64
Solution base64 Encoding.
Syntax: String imap_base64 (string text);
return value: String
Function Type: Network system
Description: This function can be decoded with a base64 encoded string. The return value is the decoded string.
Reference imap_binary () Base64_encode () Base64_decode ()

Imap_body
Read the letter in the text.
Syntax: string imap_body (int imap_stream, int msg_number, int [flags]);
return value: String
Function Type: Network system
Content Description
This function can read the Nevin (body) part of a letter. The parameter imap_stream is the code name of the IMAP. The parameter msg_number is the ordinal of the letter. Parameter flags can be omitted, with the following values
Ft_uid: The letter serial number is UID.
Ft_peek: Do not set this flag if the \SEEN flag is not configured.
Ft_internal: Return string Use system format, do not deliberately turn to CRLF line end standard.
Usage examples
This example uses the IMAP protocol to read the first letter of Myid@localhost.

Imap_check
Returns the mailbox information.
Syntax: Object Imap_check (int imap_stream);
Return value: Class
Function Type: Network system
Description: This function can obtain the current e-mail message. The return value is a class type that contains the following properties
Date of the latest message driver the interface used mailbox e-mail address nmsgs Total number of messages recent incoming mail
Class attributes represent meaning descriptions
Reference Imap_mailboxmsginfo ()

Imap_close
Close the IMAP link.
Syntax: int imap_close (int imap_stream, int [flags]);
return value: Integer
Function Type: Network system
Description: This function is used to close the IMAP data stream, which is the end link. Parameters that can be omitted if the value of flags is Cl_expunge then the email mailbox will be emptied before closing the link.
Imap_createmailbox
Create a new mailbox.
Syntax: int imap_createmailbox (int imap_stream, string mbox);
return value: Integer
Function Type: Network system
Content Description
This function is used to create a new mailbox. Success returns a true value.

Imap_delete
Flag to delete the message.
Syntax: int imap_delete (int imap_stream, int msg_number);
return value: Integer
Function Type: Network system
Content Description
This function is used only to mark messages that you want to delete. Actual deleted instruction Imap_expunge ()

Imap_deletemailbox
Delete existing mailboxes.
Syntax: int imap_deletemailbox (int imap_stream, string mbox);
return value: Integer
Function Type: Network system
Description: This function is used to delete existing mailboxes. Success returns a true value.

Imap_expunge
Deletes a flagged message.
Syntax: int imap_expunge (int imap_stream);

    • Total 5 Pages:
    • Previous page
    • 1
    • 2
    • 3
    • 4
    • 5
    • Next page

http://www.bkjia.com/PHPjc/363940.html www.bkjia.com true http://www.bkjia.com/PHPjc/363940.html techarticle the full name of IMAP is the Internet Message Access Protocol, a multi-mailbox e-mail that was developed by the Stanford University (Stanford University) in 1986, as a network information Access protocol.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.