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 -N -r1.3 -r1.4 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-callback-procs.tcl 28 Sep 2005 18:14:04 -0000 1.3 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-callback-procs.tcl 21 Oct 2005 18:04:17 -0000 1.4 @@ -20,8 +20,27 @@ {-object_id} {-file_ids} } { -} + Callback for executing code after an email has been send using the complex send mechanism. + + @param from_party_id Who is sending the email + + @param to_party_id to whom did we send this email + + @param subject of the email + + @param body Text body of the email + + @param package_id Package ID of the sending package + + @param file_ids List of file ids to be send as attachments. This will only work with files stored in the file system. The list is actually a string with the ids concated with a ",". + + @param object_id The ID of the object that is responsible for sending the mail in the first place + + @param message_id the generated message_id for this mail + +} - + ad_proc -public -callback acs_mail_lite::send { {-package_id:required} {-from_party_id:required} @@ -38,6 +57,17 @@ } { } +ad_proc -public -callback acs_mail_lite::email_form_elements { + -varname:required +} { +} + +ad_proc -public -callback acs_mail_lite::files { + -varname:required + -recipient_ids:required +} { +} + ad_proc -public -callback acs_mail_lite::incoming_email -impl acs-mail-lite { -array:required -package_id:required 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 -N -r1.37 -r1.38 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 19 Oct 2005 17:00:30 -0000 1.37 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl 21 Oct 2005 18:04:17 -0000 1.38 @@ -1024,7 +1024,9 @@ -package_id [apm_package_id_from_key "acs-mail-lite"]] if { ![empty_string_p $fixed_sender] } { - set from_addr $fixed_sender + set sender_addr $fixed_sender + } else { + set sender_addr $from_addr } # Set the message token @@ -1059,14 +1061,13 @@ mime::finalize $multi_token -subordinates all set message_id [generate_message_id] - acs_mail_lite::sendmail -from_addr $from_addr -sendlist [get_address_array -addresses $to_addr] -msg $packaged -valid_email_p t -message_id $message_id -package_id $package_id + acs_mail_lite::sendmail -from_addr $sender_addr -sendlist [get_address_array -addresses $to_addr] -msg $packaged -valid_email_p t -message_id $message_id -package_id $package_id if {[empty_string_p $package_id]} { set package_id [apm_package_id_from_key "acs-mail-lite"] } if { ![exists_and_not_null no_callback_p] } { - callback acs_mail_lite::complex_send \ -package_id $package_id \ -from_party_id [party::get_by_email -email $from_addr] \ @@ -1075,7 +1076,7 @@ -message_id $message_id \ -subject $subject \ -object_id $object_id \ - -file_ids [split $file_ids ","] + -file_ids $file_ids } }