note 84035 rejected from book.imap by thiago
| From: | thiago@php.net | Date: | Wed, 10 Sep 2008 20:06:07 +0000 |
| Subject: | note 84035 rejected from book.imap by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-144301@lists.php.net to get a copy of this message | ||
Note Submitter: dickey at ascent dot co dot cc
----
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.