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.
IMAP, POP3 and NNTP
- Introducción
- Installing/Configuring
- Constantes predefinidas
- IMAP Functions
- imap_8bit — Convertir una cadena 8bit a una cadena quoted-printable
- imap_alerts — Devuelve todos los mensajes de alerta IMAP que hayan ocurrido
- imap_append — Anexa un mensaje tipo cadena al buzón especificado
- imap_base64 — Decodificar un texto cifrado con BASE64
- imap_binary — Convertir una cadena 8bit a una cadena base64
- imap_body — Leer el cuerpo del mensaje
- imap_bodystruct — Read the structure of a specified body section of a specific message
- imap_check — Chequear el buzón de correo actual
- imap_clearflag_full — Limpia las banderas de los mensajes
- imap_close — Cerrar una secuencia IMAP
- imap_createmailbox — Crear un nuevo buzón de correo
- imap_delete — Marcar un mensaje para su borrado del buzón actual
- imap_deletemailbox — Elimina un buzón
- imap_errors — Esta función devuelve todos los errores IMAP (si hubo) que han occurrido durante la petición de la página o desde que la pila de errores se inicializó.
- imap_expunge — Elimina todos los mensajes marcados como borrados
- imap_fetch_overview — Read an overview of the information in the headers of the given message
- imap_fetchbody — Localiza una sección particular en el cuerpo del mensaje
- imap_fetchheader — Devuelve la cabecera de un mensaje
- imap_fetchstructure — Leer la estructura de una mensaje particular
- imap_get_quota — Retrieve the quota level settings, and usage statics per mailbox
- imap_get_quotaroot — Retrieve the quota settings per user
- imap_getacl — Gets the ACL for a given mailbox
- imap_getmailboxes — Lee la lista de buzones, devolviendo informacón detallada de cada uno
- imap_getsubscribed — Lista todos los buzones subscritos
- imap_header — Lee la cabecera del mensaje
- imap_headerinfo — Read the header of the message
- imap_headers — Returns headers for all messages in a mailbox
- imap_last_error — Esta función devuelve el último error IMAP (si se produjo) que ocurrió durante la petición de esta página.
- imap_list — Read the list of mailboxes
- imap_listmailbox — Lee la lista de buzones
- imap_listscan — Returns the list of mailboxes that matches the given text
- imap_listsubscribed — Lista todos los buzones subscritos
- imap_lsub — List all the subscribed mailboxes
- imap_mail_compose — Create a MIME message based on given envelope and body sections
- imap_mail_copy — Copia los mensajes especificados a un buzón
- imap_mail_move — Mueve los mensajes especificados a un buzón
- imap_mail — Send an email message
- imap_mailboxmsginfo — Obtiene información acerca del buzón actual
- imap_mime_header_decode — Decode MIME header elements
- imap_msgno — Esta función devuelve el número de secuencia del mensaje para el UID dado.
- imap_num_msg — Informa del número de mensajes en el buzón actual
- imap_num_recent — Informa el número de mensajes recientes en el buzón actual
- imap_open — Abre una sesión IMAP
- imap_ping — Comprueba si la sesión IMAP está aún activa
- imap_qprint — Convierte una cadena quoted-printable a una cadena de 8 bit
- imap_renamemailbox — Renombra un buzón
- imap_reopen — Reabre una sesión IMAP a un nuevo buzón
- imap_rfc822_parse_adrlist — Examina la cadena dirección
- imap_rfc822_parse_headers — Parse mail headers from a string
- imap_rfc822_write_address — Devuleve una dirección de correo correctamente formateada dado el buzón, host, e información personal.
- imap_savebody — Save a specific body section to a file
- imap_scanmailbox — Lee la lista de buzones y toma una cadena para buscar en el texto del buzón
- imap_search — Esta función devuelve un array de mensajes que coinciden con el criterio de busqueda dado.
- imap_set_quota — Sets a quota for a given mailbox
- imap_setacl — Sets the ACL for a giving mailbox
- imap_setflag_full — Activa flags en los mensajes
- imap_sort — Ordena un array de cabeceras de mensajes
- imap_status — Esta función devuelve el información de estado de otro buzón distinto al actual.
- imap_subscribe — Subscribe to a mailbox
- imap_thread — Returns a tree of threaded message
- imap_timeout — Set or fetch imap timeout
- imap_uid — Esta función devuelve el UID del número de secuencia del mensaje dado
- imap_undelete — Desmarca los mensajes que están marcados como borrados
- imap_unsubscribe — Unsubscribe from a mailbox
- imap_utf7_decode — Decodes a modified UTF-7 encoded string
- imap_utf7_encode — Converts ISO-8859-1 string to modified UTF-7 text
- imap_utf8 — Converts MIME-encoded text to UTF-8
IMAP
dickey at ascent dot co dot cc
25-Jun-2008 10:21
25-Jun-2008 10:21
