mv_notify_user_of_new_charge

one of the documented procedures in this installation of the ACS
Usage:
mv_notify_user_of_new_charge   db   spec_list   notify_subject   notify_body
What it does:
Helper proc for mv_charge_user; actually sends email.
Defined in: /web/philip/tcl/ad-member-value.tcl

Source code:


    set user_id [lindex $spec_list 0]
    set admin_id [lindex $spec_list 1]
    set charge_type [lindex $spec_list 2]
    set charge_key [lindex $spec_list 3]
    set amount [lindex $spec_list 4]
    set charge_comment [lindex $spec_list 5]
    set user_email [database_to_tcl_string_or_null $db "select email from users_alertable where user_id = $user_id"]
    set admin_email [database_to_tcl_string_or_null $db "select email from users where user_id = $admin_id"]
    if { ![empty_string_p $user_email] && ![empty_string_p $admin_id] } {
	set full_body "You've been assessed a charge by the [ad_system_name] community."
	if [ad_parameter UseRealMoneyP "member-value"] {
	    append full_body "\n\nThis charge will be included in your next bill."
	} else {
	    append full_body "\n\nWe don't use real money here but the charges are 
designed to reflect the reality of the costs of your actions.
It is only possible to operate community Web services if 
members conform to certain norms."
	}
	append full_body "\n\nHere's a summary of the charge:
[mv_describe_user_charge $spec_list]\n\n"
        append full_body "More explanation:\n\n$notify_body"
        ns_log Notice "mv_notify_user_of_new_charge sending email from $admin_email to $user_email"
        ns_sendmail $user_email $admin_email $notify_subject $notify_body
    }


philg@mit.edu