Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request-2.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request-2.tcl 22 Oct 2005 17:05:36 -0000 1.4 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request-2.tcl 17 Jan 2006 21:58:05 -0000 1.5 @@ -12,6 +12,10 @@ user_id:integer,notnull session_id:integer,notnull return_url:notnull + + type:notnull + community_id:integer,notnull + email_user_id:integer,notnull } -properties { } -validate { } -errors { @@ -26,4 +30,20 @@ where session_id = :session_id } +# Send emails +switch -- type { + "payment" { + dotlrn_community::send_member_email -community_id $community_id -to_user $email_user_id -type "awaiting payment" + } + "prereq" { + set mail_from [parameter::get -package_id [ad_acs_kernel_id] -parameter OutgoingSender] + set community_name [dotlrn_community::get_community_name $community_id] + + if { [parameter::get -package_id [ad_conn package_id] -parameter NotifyApplicantOnRequest] } { + dotlrn_community::send_member_email -community_id $community_id -to_user $email_user_id -type "request approval" + + } + } +} + ad_returnredirect $return_url \ No newline at end of file