- Publicity: Public Only All
imap-inbound-procs.tcl
Provides API for importing email via nsimap
- Location:
- packages/acs-mail-lite/tcl/imap-inbound-procs.tcl
- Created:
- 19 Jul 2017
- CVS Identification:
$Id: imap-inbound-procs.tcl,v 1.8.2.3 2020/09/01 14:29:57 antoniop Exp $
Procedures in this file
- acs_mail_lite::imap_check_incoming (private)
- acs_mail_lite::imap_conn_close (public)
- acs_mail_lite::imap_conn_go (private)
- acs_mail_lite::imap_conn_set (private)
- acs_mail_lite::imap_email_parse (private)
- acs_mail_lite::imap_mailbox_join (public)
- acs_mail_lite::imap_mailbox_split (public)
Detailed information
acs_mail_lite::imap_check_incoming (private)
acs_mail_lite::imap_check_incoming
Checks for new, actionable incoming email via imap connection. Email is actionable if it is identified by acs_mail_lite::email_type. When actionable, email is buffered in table acs_mail_lite_from_external and callbacks are triggered.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs_mail_lite::imap_conn_close (public)
acs_mail_lite::imap_conn_close -conn_id conn_id
Closes nsimap session with conn_id. If conn_id is 'all', then all open sessions are closed. Returns 1 if a session is closed, otherwise returns 0.
- Switches:
- -conn_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_mail_lite_inbound_procs_check
acs_mail_lite::imap_conn_go (private)
acs_mail_lite::imap_conn_go [ -conn_id conn_id ] [ -host host ] \ [ -password password ] [ -port port ] [ -timeout timeout ] \ [ -user user ] [ -flags flags ] [ -name_mb name_mb ] \ [ -default_to_inbox_p default_to_inbox_p ] \ [ -default_box_name default_box_name ]
Verifies connection (connId) is established. Tries to establish a connection if it doesn't exist. If mailbox doesn't exist, tries to find an inbox at root of tree or as close as possible to it. If -host parameter is supplied, will try connection with supplied params. Defaults to use connection info provided by parameters via acs_mail_lite::imap_conn_set.
- Switches:
- -conn_id (optional)
- -host (optional)
- -password (optional)
- -port (optional)
- Ignored for now. SSL automatically switches port.
- -timeout (optional)
- -user (optional)
- -flags (optional)
- -name_mb (optional)
- -default_to_inbox_p (optional, defaults to
"0"
)- If set to 1 and name_mb not found, assigns an inbox if found.
- -default_box_name (optional, defaults to
"inbox"
)- Set if default name for default_to_inbox_p should be something other than inbox.
- Returns:
- connectionId or empty string if unsuccessful.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_mail_lite_inbound_procs_check
acs_mail_lite::imap_conn_set (private)
acs_mail_lite::imap_conn_set [ -host host ] [ -password password ] \ [ -port port ] [ -timeout timeout ] [ -user user ] \ [ -name_mb name_mb ] [ -flags flags ]
Returns a name value list of parameters used by ACS Mail Lite imap connections If a parameter is passed with value, the value is assigned to parameter.
- Switches:
- -host (optional)
- -password (optional)
- -port (optional)
- Ignored for now. SSL automatically switches port.
- -timeout (optional)
- -user (optional)
- -name_mb (optional)
- See nsimap documentation for mailbox.name.
- -flags (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs_mail_lite::imap_email_parse (private)
acs_mail_lite::imap_email_parse [ -headers_arr_name headers_arr_name ] \ [ -parts_arr_name parts_arr_name ] [ -conn_id conn_id ] \ [ -msgno msgno ] [ -struct_list struct_list ] \ [ -section_ref section_ref ] [ -error_p error_p ]
Parse an email from an imap connection into array array_name for adding to queue via acs_mail_lite::inbound_queue_insert Parsed data is set in headers and parts arrays in calling environment. struct_list expects output list from ns_imap struct conn_id msgno
- Switches:
- -headers_arr_name (optional)
- -parts_arr_name (optional)
- -conn_id (optional)
- -msgno (optional)
- -struct_list (optional)
- -section_ref (optional)
- -error_p (optional, defaults to
"0"
)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
acs_mail_lite::imap_mailbox_join (public)
acs_mail_lite::imap_mailbox_join [ -host host ] [ -name name ] \ [ -ssl_p ssl_p ]
Creates an ns_imap usable mailbox consisting of curly brace quoted {mailbox.host}mailbox.name.
- Switches:
- -host (optional)
- -name (optional)
- -ssl_p (optional, defaults to
"0"
)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_mail_lite_inbound_procs_check
acs_mail_lite::imap_mailbox_split (public)
acs_mail_lite::imap_mailbox_split [ mailbox ]
Returns a list: mailbox.host mailbox.name ssl_p, where mailbox.host and mailbox.name are defined in ns_map documentation. If mailbox.host has suffix "/ssl", suffix is removed and ssl_p is "1", otherwise ssl_p is "0". If mailbox cannot be parsed, returns an empty list.
- Parameters:
- mailbox (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_mail_lite_inbound_procs_check