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.8 -r1.9
--- openacs-4/packages/acs-mail-lite/acs-mail-lite.info 8 Jun 2004 02:01:51 -0000 1.8
+++ openacs-4/packages/acs-mail-lite/acs-mail-lite.info 10 Jun 2004 22:56:46 -0000 1.9
@@ -7,19 +7,18 @@
f
t
-
+
Eric Lorenzo
Timo Hentschel
Simplified reliable email transmission with bounce management.
- 2004-06-07
+ 2004-06-10
This package provides a simple ns_sendmail-like interface for sending messages, but queues messages in the database to ensure reliable sending and make sending a message 'transactional'. Prefered over acs-messaging or acs-mail.
- 0
-
+
-
+
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.12 -r1.13
--- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 8 Jun 2004 00:51:42 -0000 1.12
+++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 10 Jun 2004 22:56:50 -0000 1.13
@@ -429,31 +429,49 @@
foreach {key value} $extraheaders {
append msg "\n$key\: $value"
}
-
+
## Blank line between headers and body
append msg "\n\n$body\n"
-
- if { [string equal [bounce_sendmail] "SMTP"] } {
- ## Terminate body with a solitary period
- foreach line [split $msg "\n"] {
- if [string match . $line] {
- append data .
- }
- append data "$line\r\n"
- }
- append data .
- smtp -from_addr $from_addr -sendlist $to_addr -msg $data -valid_email_p $valid_email_p -message_id $message_id -package_id $package_id
- if {![empty_string_p $bcc]} {
- smtp -from_addr $from_addr -sendlist $bcc -msg $data -valid_email_p $valid_email_p -message_id $message_id -package_id $package_id
- }
+ # ----------------------------------------------------
+ # Rollout support
+ # ----------------------------------------------------
+ # if set in /etc/config.tcl, then
+ # /packages/acs-tcl/tcl/rollout-email-procs.tcl will rename a
+ # proc to ns_sendmail. So we simply call ns_sendmail instead
+ # of the sendmail bin if the EmailDeliveryMode parameter is
+ # set - JFR
+ #-----------------------------------------------------
+ set delivery_mode [ns_config ns/server/[ns_info server]/acs/acs-rollout-support EmailDeliveryMode]
+ if {![empty_string_p $delivery_mode]} {
+ ns_sendmail "$to_addr" "$from_addr" "$subject" "$body" "$extraheaders" "$bcc"
} else {
- sendmail -from_addr $from_addr -sendlist $to_addr -msg $msg -valid_email_p $valid_email_p -message_id $message_id -package_id $package_id
- if {![empty_string_p $bcc]} {
- sendmail -from_addr $from_addr -sendlist $bcc -msg $msg -valid_email_p $valid_email_p -message_id $message_id -package_id $package_id
- }
- }
+
+ if { [string equal [bounce_sendmail] "SMTP"] } {
+ ## Terminate body with a solitary period
+ foreach line [split $msg "\n"] {
+ if [string match . $line] {
+ append data .
+ }
+ append data "$line\r\n"
+ }
+ append data .
+
+ smtp -from_addr $from_addr -sendlist $to_addr -msg $data -valid_email_p $valid_email_p -message_id $message_id -package_id $package_id
+ if {![empty_string_p $bcc]} {
+ smtp -from_addr $from_addr -sendlist $bcc -msg $data -valid_email_p $valid_email_p -message_id $message_id -package_id $package_id
+ }
+
+ } else {
+ sendmail -from_addr $from_addr -sendlist $to_addr -msg $msg -valid_email_p $valid_email_p -message_id $message_id -package_id $package_id
+ if {![empty_string_p $bcc]} {
+ sendmail -from_addr $from_addr -sendlist $bcc -msg $msg -valid_email_p $valid_email_p -message_id $message_id -package_id $package_id
+ }
+ }
+
+
+ }
}
ad_proc -private sendmail {