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 ]
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.
Adds these index to headers array:
- '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.
- 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
- -reply_too_fast_s(defaults to
- -check_subject_p(defaults to
- Set to 1 to check email subject.
- Partial Call Graph (max 5 caller/called nodes):