Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -r1.191.2.5 -r1.191.2.6 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 21 Jul 2005 22:48:54 -0000 1.191.2.5 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 4 Aug 2005 18:47:00 -0000 1.191.2.6 @@ -2232,7 +2232,16 @@ where enabled_p and community_id = :community_id and type = :type - }] } { + }] } else { + set default_email [lindex [callback dotlrn::default_member_email -community_id $community_id -to_user $to_user -type $type] 0] + if {[llength $default_email]} { + set from_addr [lindex $default_email 0] + set subject [lindex $default_email 1] + set email [lindex $default_email 2] + } + } + if {[exists_and_not_null email]} { + # Shamelessly cut & pasted from bulk mail if { [empty_string_p $from_addr] } { set from_addr [ad_system_owner] Index: openacs-4/packages/dotlrn/tcl/dotlrn-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-callback-procs.tcl,v diff -u -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/dotlrn/tcl/dotlrn-callback-procs.tcl 31 Jul 2005 22:33:50 -0000 1.1.2.3 +++ openacs-4/packages/dotlrn/tcl/dotlrn-callback-procs.tcl 4 Aug 2005 18:47:00 -0000 1.1.2.4 @@ -135,4 +135,23 @@ } return $result -} \ No newline at end of file +} + +ad_proc -callback dotlrn::default_member_email { + -community_id + -to_user + -type +} { + Used to define a default email body message for member emails if + an email template is not found for community_id,type in + dotlrn_email_templates + + @param community_id dotlrn community_id sending email + @param to_user user_id to send email to + @param type type of email from dotlrn_email_templates table + + @return should return a 3 element list of from_addr subject + email_body. If no email exists, should return -code + continue to return no results to the caller + +} - \ No newline at end of file