Index: openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl,v diff -u -r1.90.2.1 -r1.90.2.2 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 28 Aug 2013 22:53:44 -0000 1.90.2.1 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 2 Oct 2013 10:02:28 -0000 1.90.2.2 @@ -401,7 +401,7 @@ } # Set the message_id - set message_id "[mime::uniqueID]" + set message_id [mime::uniqueID] # Set the date set message_date [acs_mail_lite::utils::build_date] @@ -410,7 +410,7 @@ set tokens [acs_mail_lite::utils::build_body -mime_type $mime_type -- $body] # Add attachments if any - if {[exists_and_not_null file_ids]} { + if {$file_ids ne ""} { set item_ids [list] # Check if we are dealing with revisions or items. @@ -425,13 +425,13 @@ db_foreach get_file_info {} { lappend tokens [mime::initialize \ - -param [list name "[ad_quotehtml $title]"] \ + -param [list name [ad_quotehtml $title]] \ -header [list "Content-Disposition" "attachment; filename=\"$name\""] \ -header [list Content-Description $title] \ -canonical $mime_type \ -file "[cr_fs_path]$filename"] } - set tokens [mime::initialize -canonical "multipart/mixed" -parts "$tokens"] + set tokens [mime::initialize -canonical "multipart/mixed" -parts $tokens] } ### Add the headers @@ -447,7 +447,7 @@ # Add extra headers foreach header $extraheaders { - mime::setheader $tokens "[lindex $header 0]" "[lindex $header 1]" + mime::setheader $tokens [lindex $header 0] [lindex $header 1] } # Rollout support @@ -467,7 +467,7 @@ # if any of the recipient is not in the allowed list # email message has to be sent to the log instead - if { [lsearch -exact $allowed_addr $recipient] eq -1 } { + if {$recipient ni $allowed_addr} { set send_mode "log" set notice "logging email because one of the recipient ($recipient) is not in the EmailAllow list" break @@ -492,8 +492,8 @@ } # Prepare the headers list of recipients - set headers_list [list [list From "$from_addr"] \ - [list Reply-To "$reply_to"] \ + set headers_list [list [list From $from_addr] \ + [list Reply-To $reply_to] \ [list To [join $to_addr ","]]] if { $cc_addr ne "" } { @@ -527,7 +527,7 @@ # Add recipients to headers foreach header $headers_list { - mime::setheader $tokens "[lindex $header 0]" "[lindex $header 1]" + mime::setheader $tokens [lindex $header 0] [lindex $header 1] } # Retrieve the email message as a string @@ -537,7 +537,7 @@ mime::finalize $tokens -subordinates all # Send the email message to the log - ns_log Notice "acs-mail-lite::send: $notice\n\n**********\nEnveloppe sender: $originator\n\n$packaged\n**********" + ns_log Notice "acs-mail-lite::send: $notice\n\n**********\nEnvelope sender: $originator\n\n$packaged\n**********" } else { Index: openacs-4/packages/acs-mail-lite/tcl/incoming-mail-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/Attic/incoming-mail-procs.tcl,v diff -u -r1.6 -r1.6.2.1 --- openacs-4/packages/acs-mail-lite/tcl/incoming-mail-procs.tcl 30 Mar 2013 19:07:23 -0000 1.6 +++ openacs-4/packages/acs-mail-lite/tcl/incoming-mail-procs.tcl 2 Oct 2013 10:02:28 -0000 1.6.2.1 @@ -19,7 +19,7 @@ } { set domain [parameter::get_from_package_key -package_key "acs-mail-lite" -parameter "BounceDomain"] if { $domain eq "" } { - regsub {http://} [ns_config ns/server/[ns_info server]/module/nssock hostname] {} domain + regsub {http://} [ns_config [ns_driversection -driver nssock] hostname] _ domain } return $domain } @@ -237,7 +237,7 @@ array set param $params # Append the file if there exist a filename to use. Otherwise do not append - if {[exists_and_not_null param(name)]} { + if {([info exists param(name)] && $param(name) ne "")} { set filename $param(name) # Determine the content_type