Index: openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-callback-procs.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-callback-procs.tcl 19 Jan 2008 20:50:42 -0000 1.18 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-callback-procs.tcl 8 Sep 2008 20:26:43 -0000 1.19 @@ -70,6 +70,7 @@ {-cc_addr} {-bcc_addr} {-file_ids} + {-object_id} } { Callback for executing code after an email has been send using the complex send mechanism. @@ -94,6 +95,8 @@ @param file_ids List of file ids sent as attachments. + @param object_id The ID of the object that is responsible for sending the mail in the first place + } - ad_proc -public -callback acs_mail_lite::incoming_email { Index: openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-oracle.xql,v diff -u -r1.13 -r1.14 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-oracle.xql 17 Jul 2008 18:00:17 -0000 1.13 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-oracle.xql 8 Sep 2008 20:26:43 -0000 1.14 @@ -21,7 +21,8 @@ cc_addr, bcc_addr, body, - extraheaders + extraheaders, + object_id ) values (acs_mail_lite_id_seq.nextval, @@ -39,7 +40,8 @@ :cc_addr, :bcc_addr, :body, - :extraheaders + :extraheaders, + :object_id ) @@ -81,7 +83,8 @@ mime_type, decode(no_callback_p,'t',1,0) as no_callback_p, extraheaders, - decode(use_sender_p,'t',1,0) as use_sender_p + decode(use_sender_p,'t',1,0) as use_sender_p, + object_id from acs_mail_lite_queue where locking_server = '' or locking_server is NULL Index: openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql 9 Jan 2008 16:51:30 -0000 1.12 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql 8 Sep 2008 20:26:43 -0000 1.13 @@ -21,7 +21,8 @@ mime_type, no_callback_p, extraheaders, - use_sender_p + use_sender_p, + object_id ) values (nextval('acs_mail_lite_id_seq'), @@ -39,7 +40,8 @@ :mime_type, (case when :no_callback_p = '1' then TRUE else FALSE end), :extraheaders, - (case when :use_sender_p = '1' then TRUE else FALSE end) + (case when :use_sender_p = '1' then TRUE else FALSE end), + :object_id ) @@ -82,7 +84,8 @@ mime_type, (case when no_callback_p = TRUE then 1 else 0 end) as no_callback_p, extraheaders, - (case when use_sender_p = TRUE then 1 else 0 end) as use_sender_p + (case when use_sender_p = TRUE then 1 else 0 end) as use_sender_p, + object_id from acs_mail_lite_queue where locking_server = '' or locking_server is NULL 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.80 -r1.81 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 4 Sep 2008 18:07:49 -0000 1.80 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 8 Sep 2008 20:26:43 -0000 1.81 @@ -224,6 +224,7 @@ {-file_ids ""} {-extraheaders ""} -use_sender:boolean + {-object_id ""} } { Prepare an email to be send with the option to pass in a list @@ -279,7 +280,8 @@ -mime_type $mime_type \ -no_callback_p $no_callback_p \ -extraheaders $extraheaders \ - -use_sender_p $use_sender_p + -use_sender_p $use_sender_p \ + -object_id $object_id } else { # else, store it in the db and let the sweeper deliver the mail set creation_date [clock format [clock seconds] -format "%Y.%m.%d %H:%M:%S"] @@ -356,6 +358,7 @@ {-no_callback_p "0"} {-extraheaders ""} {-use_sender_p "0"} + {-object_id ""} } { Prepare an email to be send immediately with the option to pass in a list @@ -389,6 +392,7 @@ @param no_callback_p Indicates if callback should be executed or not. If you don't provide it it will execute callbacks. @param use_sender_p Boolean indicating that from_addr should be used regardless of fixed-sender parameter + @param object_id Object id that caused this email to be sent } { # Package_id required by the callback (emmar: no idea what for) @@ -518,7 +522,8 @@ -subject $subject \ -cc_addr $cc_addr \ -bcc_addr $bcc_addr \ - -file_ids $file_ids + -file_ids $file_ids \ + -object_id $object_id } } }