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.31 -r1.32 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 28 Sep 2005 18:14:04 -0000 1.31 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 30 Sep 2005 20:18:33 -0000 1.32 @@ -891,6 +891,7 @@ {-extraheaders ""} {-bcc ""} {-package_id ""} + {-no_callback "t"} } { Reliably send an email message. @@ -903,6 +904,7 @@ @option extraheaders extra mail headers in an ns_set @option bcc see to_addr @option package_id To be used for calling a package-specific proc when mail has bounced + @option no_callback Boolean that indicates if callback should be executed or not. Set to "t" if you don't want to execute callbacks, or "f" otherwise, Default "t". @returns the Message-Id of the mail } { ## Extract "from" email address @@ -960,15 +962,16 @@ db_dml create_queue_entry {} } + if { !$no_callback } { + callback acs_mail_lite::send \ + -package_id $package_id \ + -from_party_id $from_party_id \ + -to_party_id $to_party_id \ + -body $body \ + -message_id $message_id \ + -subject $subject + } - callback acs_mail_lite::send \ - -package_id $package_id \ - -from_party_id $from_party_id \ - -to_party_id $to_party_id \ - -body $body \ - -message_id $message_id \ - -subject $subject - return $message_id } @@ -985,6 +988,7 @@ {-folder_id ""} {-mime_type "text/plain"} {-object_id ""} + {-no_callback "t"} } { Prepare an email to be send with the option to pass in a list @@ -1010,6 +1014,8 @@ @param object_id The ID of the object that is responsible for sending the mail in the first place + @param no_callback Boolean that indicates if callback should be executed or not. Set to "t" if you don't want to execute callbacks, or "f" otherwise, Default "t". + } { @@ -1051,15 +1057,17 @@ set package_id [apm_package_id_from_key "acs-mail-lite"] } - callback acs_mail_lite::complex_send \ - -package_id $package_id \ - -from_party_id [party::get_by_email -email $from_addr] \ - -to_party_id [party::get_by_email -email $to_addr] \ - -body $body \ - -message_id $message_id \ - -subject $subject \ - -object_id $object_id \ - -file_ids [split $file_ids ","] + if { !$no_callback } { + callback acs_mail_lite::complex_send \ + -package_id $package_id \ + -from_party_id [party::get_by_email -email $from_addr] \ + -to_party_id [party::get_by_email -email $to_addr] \ + -body $body \ + -message_id $message_id \ + -subject $subject \ + -object_id $object_id \ + -file_ids [split $file_ids ","] + } } ad_proc -private sweeper {} {