acs_mail_lite::parse_email (private)

 acs_mail_lite::parse_email -file file -array array

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

An email is split into several parts: headers, bodies and files lists and all headers directly. The headers consists of a list with header names as keys and their corresponding values. All keys are lowercase. The bodies consists of a list with two elements: content-type and content. The files consists of a list with three elements: content-type, filename and content. The array with all the above data is upvared to the caller environment. Important headers are: -message-id (a unique id for the email, is different for each email except it was bounced from a mailer daemon) -subject -from -to Others possible headers: -date -received -references (this references the original message id if the email is a reply) -in-reply-to (this references the original message id if the email is a reply) -return-path (this is used for mailer daemons to bounce emails back like bounce-user_id-signature-package_id@service0.com) Optional application specific stuff only exist in special cases: X-Mozilla-Status X-Virus-Scanned X-Mozilla-Status2 X-UIDL X-Account-Key X-Sasl-enc You can therefore get a value for a header either through iterating the headers list or simply by calling i.e. "set message_id $email(message-id)". Note: We assume "application/octet-stream" for all attachments and "base64" for as transfer encoding for all files. Note: tcllib required - mime, base64

Switches:
-file (required)
-array (required)
Author:
Nima Mazloumi <nima.mazloumi@gmx.de>
Created:
2005-07-15

Partial Call Graph (max 5 caller/called nodes):
%3 acs_mail_lite::load_mails acs_mail_lite::load_mails (public, deprecated) acs_mail_lite::parse_email acs_mail_lite::parse_email acs_mail_lite::load_mails->acs_mail_lite::parse_email mime::finalize mime::finalize acs_mail_lite::parse_email->mime::finalize mime::getbody mime::getbody acs_mail_lite::parse_email->mime::getbody mime::getheader mime::getheader acs_mail_lite::parse_email->mime::getheader mime::getproperty mime::getproperty acs_mail_lite::parse_email->mime::getproperty mime::initialize mime::initialize acs_mail_lite::parse_email->mime::initialize

Testcases:
No testcase defined.
[ show source ]
Show another procedure: