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

search for in the

Introduction> <cyrus_unbind
Last updated: Fri, 18 Jul 2008

view this page in

IMAP, POP3 and NNTP



add a note add a note User Contributed Notes
IMAP
dickey at ascent dot co dot cc
25-Jun-2008 07: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.

Introduction> <cyrus_unbind
Last updated: Fri, 18 Jul 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites