Index: openacs-4/packages/acs-mail-lite/acs-mail-lite.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/acs-mail-lite.info,v diff -u -r1.44 -r1.45 --- openacs-4/packages/acs-mail-lite/acs-mail-lite.info 11 Jul 2009 23:47:24 -0000 1.44 +++ openacs-4/packages/acs-mail-lite/acs-mail-lite.info 16 Mar 2010 12:10:27 -0000 1.45 @@ -6,8 +6,10 @@ Mail Services Lite t t + f + t - + Malte Sussdorff Timo Hentschel Simplified reliable email transmission with bounce management. @@ -16,10 +18,10 @@ This package provides a service for sending messages, queueing messages in the database to ensure reliable sending and make sending a message 'transactional'. Replacement for acs-mail. 2 - + - + @@ -28,22 +30,25 @@ + + + + - - + Index: openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-init.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-init.tcl 10 Oct 2008 11:48:45 -0000 1.12 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-init.tcl 16 Mar 2010 12:10:27 -0000 1.13 @@ -25,3 +25,12 @@ nsv_set acs_mail_lite check_bounce_p 0 # ad_schedule_proc -thread t -schedule_proc ns_schedule_daily [list 0 25] acs_mail_lite::check_bounces + + +# Redefine ns_sendmail as a wrapper for acs_mail_lite::send + + +ns_log Notice "acs-mail-lite: renaming acs_mail_lite::sendmail to ns_sendmail" + +rename ns_sendmail _old_ns_sendmail +rename acs_mail_lite::sendmail ns_sendmail 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.86 -r1.87 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 19 Aug 2009 11:26:23 -0000 1.86 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 16 Mar 2010 12:10:27 -0000 1.87 @@ -451,7 +451,7 @@ } # Rollout support - set delivery_mode [ns_config ns/server/[ns_info server]/acs/acs-rollout-support EmailDeliveryMode] + set delivery_mode [parameter::get -package_id [get_package_id] -parameter EmailDeliveryMode -default default] switch $delivery_mode { log { @@ -460,7 +460,7 @@ } filter { set send_mode "smtp" - set allowed_addr [split [ns_config ns/server/[ns_info server]/acs/acs-rollout-support EmailAllow] ","] + set allowed_addr [parameter::get -package_id [get_package_id] -parameter EmailAllow] foreach recipient [concat $to_addr $cc_addr $bcc_addr] { @@ -482,7 +482,7 @@ # Since we have to redirect to a list of addresses # we need to remove the CC and BCC ones - set to_addr [split [ns_config ns/server/[ns_info server]/acs/acs-rollout-support EmailRedirectTo] ","] + set to_addr [parameter::get -package_id [get_package_id] -parameter EmailRedirectTo] set cc_addr "" set bcc_addr "" } @@ -587,4 +587,37 @@ #--------------------------------------- + ad_proc -public -deprecated sendmail { + to + from + subject + body + {extraheaders {}} + {bcc {}} + } { + + Replacement for ns_sendmail for backward compability. + + } { + + + ns_log Warning "ns_sendmail is no longer supported in OpenACS. Use acs_mail_lite::send instead." + + set extraheaders_list [list] + + if { $extraheaders ne "" } { + foreach {key value} [util_ns_set_to_list -set $extraheaders] { + lappend extraheaders_list [list $key $value] + } + } + + acs_mail_lite::send \ + -to_addr [split $to ","] \ + -from_addr $from \ + -subject $subject \ + -body $body \ + -bcc_addr [split $bcc ","] \ + -extraheaders $extraheaders_list + } + }