Index: openacs-4/packages/dotlrn-ecommerce/www/application-reject.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/application-reject.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-ecommerce/www/application-reject.tcl 8 Jul 2005 15:51:44 -0000 1.1 +++ openacs-4/packages/dotlrn-ecommerce/www/application-reject.tcl 16 Jul 2005 12:51:06 -0000 1.2 @@ -11,11 +11,27 @@ } { community_id:integer,notnull user_id:integer,notnull + {type waiting_list} + {send_email_p 1} } -properties { } -validate { } -errors { } dotlrn_community::membership_reject -community_id $community_id -user_id $user_id +# Send email to applicant +set actor_id [ad_conn user_id] + +if { $user_id != $actor_id && $send_email_p } { + set applicant_email [cc_email_from_party $user_id] + set actor_email [cc_email_from_party $actor_id] + set community_name [dotlrn_community::get_community_name $community_id] + acs_mail_lite::send \ + -to_addr $applicant_email \ + -from_addr $actor_email \ + -subject [subst "[_ dotlrn-ecommerce.Application_rejected]"] \ + -body [subst "[_ dotlrn-ecommerce.lt_Your_application_to_j_1]"] +} + ad_returnredirect applications