acs_mail_lite::email_type (public)

 acs_mail_lite::email_type [ -subject subject ] [ -from from ] \
    [ -headers headers ] [ -header_arr_name header_arr_name ] \
    [ -reply_too_fast_s reply_too_fast_s ] \
    [ -check_subject_p check_subject_p ]

Defined in packages/acs-mail-lite/tcl/email-inbound-procs.tcl

Scans email's subject, from and headers for actionable type.

Returns actionable type and saves same type in header_arr_name(aml_type), and saves some normalized header info to reduce redundant processing downstream. See code comments for details.

Actional types: 'auto_gen' 'auto_reply', 'bounce', 'in_reply_to' or empty string indicating 'other' type.

  • 'auto_reply' may be a Delivery Status Notification for example.
  • 'bounce' is a specific kind of Delivery Status Notification.
  • 'in_reply_to' is an email reporting to originate from local email, which needs to be tested further to see if OpenACS needs to act on it versus a reply to a system administrator email for example.
  • 'auto_gen' is an auto-generated email that does not qualify as 'auto_reply', 'bounce', or 'in_reply_to'
  • '' (Empty string) refers to email that the system does not recognize as a reply of any kind. If not a qualifying type, returns empty string.
Adds these index to headers array:
  • received_cs: the received time of email in tcl clock epoch time.
  • aml_type: the same value returned by this proc.

If additional headers not calculated, they have value of empty string.

If headers and header_arr_name provided, only header_arr_name will be used, if header_arr_name contains at least one value.

If check_subject_p is set 1, checks for common subjects identifying autoreplies. This is not recommended to rely on exclusively. This feature provides a framework for extending classification of emails for deployment routing purposes.

If array includes keys from 'ns_imap struct', such as internaldate.*, then adds header with epoch time quivilent to header index received_cs

of email
of email
of email, a block of text containing all headers and values
(defaults to "10") (optional)
(defaults to "0") (optional)
Set to 1 to check email subject.

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_mail_lite_inbound_procs_check acs_mail_lite_inbound_procs_check (test acs-mail-lite) acs_mail_lite::email_type acs_mail_lite::email_type test_acs_mail_lite_inbound_procs_check->acs_mail_lite::email_type acs_mail_lite::imap_conn_set acs_mail_lite::imap_conn_set (private) acs_mail_lite::email_type->acs_mail_lite::imap_conn_set acs_mail_lite::inbound_filters acs_mail_lite::inbound_filters (private) acs_mail_lite::email_type->acs_mail_lite::inbound_filters acs_mail_lite::parse_email_address acs_mail_lite::parse_email_address (private) acs_mail_lite::email_type->acs_mail_lite::parse_email_address acs_mail_lite::sched_parameters acs_mail_lite::sched_parameters (public) acs_mail_lite::email_type->acs_mail_lite::sched_parameters ad_outgoing_sender ad_outgoing_sender (public) acs_mail_lite::email_type->ad_outgoing_sender acs_mail_lite::imap_check_incoming acs_mail_lite::imap_check_incoming (private) acs_mail_lite::imap_check_incoming->acs_mail_lite::email_type acs_mail_lite::maildir_check_incoming acs_mail_lite::maildir_check_incoming (private) acs_mail_lite::maildir_check_incoming->acs_mail_lite::email_type

[ show source ]
Show another procedure: