
Untitled
By: a guest on
Oct 4th, 2011 | syntax:
None | size: 0.87 KB | views:
64 | expires: Never
# get list of all incoming mail
if {[catch {
set messages [glob "$queue_dir/new/*"]
} errmsg]} {
if {[string match "no files matched glob pattern*" $errmsg ]} {
ns_log Notice "load_mails: queue dir = $queue_dir/new/*, no messages"
ns_log Debug "load_mails: queue dir = $queue_dir/new/*, no messages"
} else {
ns_log Notice "load_mails: queue dir = $queue_dir/new/ error $errmsg"
ns_log Error "load_mails: queue dir = $queue_dir/new/ error $errmsg"
}
return [list]
}
ns_log Notice "MSGS: $messages"
# loop over every incoming mail
foreach msg $messages {
ns_log Debug "load_mails: opening $msg"
array set email {}
# This will parse the E-mail and extract the files to the file system
parse_email -file $msg -array email
...