libEtPan! API

Viet Hoa DINH


Table of Contents
1. Introduction
2. Tools and datatypes
Array
carray_new and carray_free
carray_set_size
carray_count, carray_add, carray_get and carray_set
carray_delete
carray_data
List
clist_new and clist_free
clist_isempty and clist_count
running through clist
clist modification
clist_foreach
clist_concat
Hash table
chash_new and chash_free
chash_set and chash_get
chash_delete
chash_resize
running through the chash
chash_size and chash_count
Buffered I/O
socket stream
TLS stream
non-buffered I/O
strings
constructor and destructor
string value modification
insertion in string, deletion in string
referencing string
3. Internet Message Format
Quick start
Parse message headers
Render the message headers
Data types
mailimf_mailbox - mailbox
mailimf_address - address
mailimf_mailbox_list - list of mailboxes
mailimf_address_list - list of addresses
mailimf_group - named group of mailboxes
mailimf_date_time - date of a message
mailimf_orig_date - parsed content of date header
mailimf_from - parsed content of From header
mailimf_sender - parsed content of Sender header
mailimf_reply_to - parsed content of Reply-To header
mailimf_to - parsed content of To header
mailimf_cc - parsed content of Cc
mailimf_bcc - parsed content of Bcc field
mailimf_message_id - parsed content of Message-ID header
mailimf_in_reply_to - parsed content of In-Reply-To field
mailimf_references - parsed content of References field
mailimf_subject - parsed content of Subject field
mailimf_comments - parsed content of Comments field
mailimf_keywords - parsed content of Keywords field
mailimf_return - parsed content of Return-Path field
mailimf_path - address in Return-Path field
mailimf_optional_field - non-standard header
mailimf_field - header field
mailimf_fields - list of header fields
mailimf_body - message body without headers
mailimf_message - parsed message
mailimf_single_fields - simplified fields
Parser functions
mailimf_address_list_parse
mailimf_address_parse
mailimf_body_parse
mailimf_envelope_and_optional_fields_parse
mailimf_envelope_fields_parse
mailimf_optional_fields_parse
mailimf_fields_parse
mailimf_ignore_field_parse
mailimf_mailbox_list_parse
mailimf_mailbox_parse
mailimf_message_parse
Creation functions
mailimf_mailbox_list
mailimf_address_list
mailimf_fields
Rendering of messages
Header fields
4. MIME
Quick start
Parse MIME message
Render the MIME message
Data types
mailmime_composite_type - Composite MIME type
mailmime_content - MIME content type (Content-Type)
mailmime_discrete_type - MIME discrete type
mailmime_field - MIME header field
mailmime_mechanism - MIME transfer encoding mechanism (Content-Transfer-Encoding)
mailmime_fields - header fields
mailmime_parameter - MIME type parameter
mailmime_type - MIME main type
mailmime_language - Language of MIME part
mailmime_data - Content of MIME part
mailmime - MIME part
mailmime_disposition - MIME disposition information (Content-Disposition)
mailmime_disposition_type - Type of MIME disposition
mailmime_disposition_parm - MIME disposition parameter
mailmime_single_fields - MIME headers
Parser functions
mailmime_content_parse
mailmime_description_parse
mailmime_encoding_parse
mailmime_field_parse
mailmime_id_parse
mailmime_fields_parse
mailmime_version_parse
mailmime_parameter_parse
mailmime_language_parse
mailmime_disposition_parse
mailmime_disposition_type_parse
mailmime_encoded_phrase_parse
mailmime_parse
mailmime_base64_body_parse
mailmime_quoted_printable_body_parse
mailmime_binary_body_parse
mailmime_part_parse
Rendering of MIME parts
mailmime_fields_write, mailmime_content_write and mailmime_content_type_write
mailmime_write
mailmime_quoted_printable_write and mailmime_base64_write
mailmime_data_write
Creation functions
mailmime_disposition_new_filename and mailmime_disposition_new_with_data
mailmime_fields_new_empty and mailmime_fields_add
mailmime_fields_new_with_data and mailmime_fields_new_with_version
mailmime_get_content_message
mailmime_data_new_data and mailmime_data_new_file
mailmime_new_message_data, mailmime_new_empty and mailmime_new_with_content
mailmime_set_preamble_file, mailmime_set_epilogue_file, mailmime_set_preamble_text and mailmime_set_epilogue_text
mailmime_set_body_file and mailmime_set_body_text
mailmime_add_part, mailmime_remove_part, mailmime_smart_add_part and mailmime_smart_remove_part
mailmime_set_imf_fields
mailmime_fields_new_encoding and mailmime_fields_new_filename
Helper functions
mailmime_transfer_encoding_get
mailmime_content_charset_get and mailmime_content_param_get
5. Storages, folders, messages
Introduction
Message
MIME part
Mailbox
Storage
Folder
Session
Error codes
Storage
Storage driver
Storage
mailstorage_new and mailstorage_free
mailstorage_connect and mailstorage_disconnect
IMAP storage
Example
Folder
Folder driver
Folder
mailfolder_new and mail_folder_free
mailfolder_connect and mailfolder_disconnect
mailfolder_noop
mailfolder_check
mailfolder_expunge
mailfolder_status
mailfolder_append_message
mailfolder_get_messages_list
mailfolder_get_envelopes_list
mailfolder_get_message
mailfolder_get_message_by_uid
Example
Message
Message driver
Message
mailmessage_new
mailmessage_init
mailmessage_flush
mailmessage_check
mailmessage_fetch_result_free
mailmessage_fetch
mailmessage_fetch_header
mailmessage_fetch_body
mailmessage_fetch_size
mailmessage_get_bodystructure
mailmessage_fetch_section
mailmessage_fetch_section_header
mailmessage_fetch_section_mime
mailmessage_fetch_section_body
mailmessage_fetch_envelope
mailmessage_get_flags
mailmessage_resolve_single_fields
Message list
Message tree
Message flags
Example
Session
Session driver
Session
mailsession_parameters
mailsession_connect_stream
mailsession_connect_path
mailsession_starttls
mailsession_login
mailsession_logout
mailsession_noop
mailsession_check_folder
mailsession_select_folder
mailsession_expunge_folder
mailsession_status_folder
mailsession_messages_number
mailsession_recent_number
mailsession_unseen_number
mailsession_append_message
mailsession_get_messages_list
mailsession_get_envelopes_list
mailsession_get_message
mailsession_get_message_by_uid
List of Examples
2-1. carray creation
2-2. preallocating carray
2-3. carray access
2-4. deletion in carray
2-5. clist creation
2-6. displaying content of clist
2-7. deleting elements in a clist
2-8. merging two clists
2-9. chash insert and lookup
2-10. key deletion in a chash
2-11. running through a chash
3-1. example of mailbox
3-2. mailbox creation and display
3-3. address creation and display
3-4. Creation and display of mailimf_mailbox_list
3-5. creation and display of list of addresses
3-6. example of group
3-7. creation and display of a group
3-8. example of date
3-9. creation and display of date
3-10. creation and display of Date field
3-11. creation and display of a From header
3-12. creation and display of Sender field
3-13. creation and display of Reply-To field
3-14. creation and display of To field
3-15. creation and display of Cc field
3-16. creation and display of Bcc field
3-17. example of Message-ID
3-18. creation and display of Message-ID field
3-19. creation and display of In-Reply-To field
3-20. creation and display of References field
3-21. creation and display of Subject field
3-22. creation and display of Comment field
3-23. creation and display of Keywords field
3-24. creation and display of Return-Path field
3-25. Creation and display of return path
3-26. creation and display of non-standard fields
3-27. creation and display of field
3-28. creation and display of header fields
3-29. creation and display of message body
3-30. creation and display of message
3-31. using mailimf_single_fields
3-32. using mailimf_single_fields without memory allocation
3-33. parsing a list of addresses
3-34. parsing an address
3-35. parsing a message body
3-36. parsing commonly used fields and return other fields in a non-parsed form
3-37. parsing commonly used fields
3-38. parsing optional fields
3-39. parsing header fields
3-40. skipping fields
3-41. parsing a list of mailboxes
3-42. parsing a mailbox
3-43. parsing a message
3-44. creating a list of mailboxes
3-45. creation of header fields
3-46. rendering of fields
4-1. create and display MIME composite type
4-2. Creation and display of MIME content type
4-3. Creation and display of MIME discrete type
4-4. Creation and display of MIME header field
4-5. Creation and display of MIME transfer encoding mechanism
4-6. Creation and display of MIME fields
4-7. Creation and display of MIME type parameter
4-8. Creation and display of MIME main type
4-9. Creation and display of language of MIME part
4-10. Creation and display of MIME part content
4-11. Creation and display of MIME part
4-12. Creation and display of MIME disposition information
4-13. Creation and display of MIME disposition type
4-14. Creation and display of MIME disposition parameter
4-15. Creation and display of single fields
4-16. Parsing MIME content type
4-17. Parsing MIME description
4-18. parsing MIME encoding mechanism
4-19. parsing MIME header field
4-20. Parsing MIME content identifier
4-21. parsing MIME header fields
4-22. parsing MIME version
4-23. parsing a MIME parameter
4-24. Parsing the MIME content langage
4-25. Parsing the MIME content disposition
4-26. parsing a MIME content disposition type
4-27. decoding a MIME encoded header string
4-28. parsing a MIME message
4-29. Parsing a base64 encoded part
4-30. Parsing a quoted printable encoded part
4-31. Parsing a binary encoded part
4-32. Parsing a MIME encoded part
4-33. rendering MIME header fields
4-34. render base64 or quoted printable
4-35. creating a MIME content disposition
4-36. creating a MIME header fields list
4-37. creating new fields
4-38. Creating a MIME content type
4-39. creating MIME content
4-40. creating a MIME part
4-41. setting preamble and epilogue
4-42. creating a MIME part
4-43. modifying MIME structure
4-44. modifying MIME structure
4-45. creating MIME fields with only Content-Transfer-Encoding
4-46. extracting MIME encoding mechanism
4-47. extracting information from MIME content type
5-1. use of storage
5-2. use of folder
5-3. use of message