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.18 -r1.19
--- openacs-4/packages/acs-mail-lite/acs-mail-lite.info 15 May 2006 06:36:28 -0000 1.18
+++ openacs-4/packages/acs-mail-lite/acs-mail-lite.info 19 Jun 2006 06:34:07 -0000 1.19
@@ -7,15 +7,15 @@
f
t
-
+
Eric Lorenzo
Timo Hentschel
Simplified reliable email transmission with bounce management.
2005-10-19
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.50 -r1.51
--- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 8 Jun 2006 07:12:03 -0000 1.50
+++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 19 Jun 2006 06:34:07 -0000 1.51
@@ -1018,6 +1018,7 @@
{-object_id ""}
{-single_email_p ""}
{-no_callback_p ""}
+ {-extraheaders ""}
-single_email:boolean
-no_callback:boolean
-use_sender:boolean
@@ -1066,6 +1067,8 @@
@param object_id The ID of the object that is responsible for sending the mail in the first place
+ @param extraheaders List of keywords and their values passed in for headers. Interesting ones are: "Precedence: list" to disable autoreplies and mark this as a list message. This is as list of lists !!
+
@param single_email Boolean that indicates that only one mail will be send (in contrast to one e-mail per recipient).
@param no_callback Boolean that indicates if callback should be executed or not. If you don't provide it it will execute callbacks
@@ -1140,13 +1143,28 @@
}
}
+
+ #### Now we start with composing the mail message ####
+
set multi_token [mime::initialize -canonical multipart/mixed -parts "$tokens"]
-
- set packaged [mime::buildmessage $multi_token]
+ # Set the message_id
set message_id "[mime::uniqueID]"
-
- # Now the To recipients
+ mime::setheader $multi_token "message_id" "[mime::uniqueID]"
+
+ # Set the date
+ mime::setheader $multi_token date "[mime::parsedatetime -now proper]"
+
+ # Set the subject
+ mime::setheader $multi_token Subject "$subject"
+
+ foreach header $extraheaders {
+ mime::setheader $multi_token "[lindex $header 0]" "[lindex $header 1]"
+ }
+
+ set packaged [mime::buildmessage $multi_token]
+
+ # Now the To recipients
set to_list [list]
foreach email $to_addr {
@@ -1305,11 +1323,8 @@
-header [list From "$from_string"] \
-header [list To "[join $to_list ","]"] \
-header [list CC "[join $cc_list ","]"] \
- -header [list BCC "[join $bcc_list ","]"] \
- -header [list Subject "$subject"] \
- -header [list message-id "[mime::uniqueID]"] \
- -header [list date "[mime::parsedatetime -now proper]"]
-
+ -header [list BCC "[join $bcc_list ","]"]
+
#Close all mime tokens
mime::finalize $multi_token -subordinates all
@@ -1347,11 +1362,8 @@
smtp::sendmessage $multi_token \
-header [list From "$from_string"] \
- -header [list To "$email"] \
- -header [list Subject "$subject"] \
- -header [list message-id "$message_id"] \
- -header [list date "[mime::parsedatetime -now proper]"]
-
+ -header [list To "$email"]
+
if { !$no_callback_p } {
callback acs_mail_lite::complex_send \
-package_id $package_id \
@@ -1373,10 +1385,7 @@
smtp::sendmessage $multi_token \
-header [list From "$from_string"] \
- -header [list To "$email"] \
- -header [list Subject "$subject"] \
- -header [list message-id "$message_id"] \
- -header [list date "[mime::parsedatetime -now proper]"]
+ -header [list To "$email"]
if { !$no_callback_p } {
callback acs_mail_lite::complex_send \