Index: openacs-4/packages/contacts/lib/email.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/email.tcl,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/contacts/lib/email.tcl 25 Sep 2005 12:40:39 -0000 1.11
+++ openacs-4/packages/contacts/lib/email.tcl 28 Sep 2005 22:13:26 -0000 1.12
@@ -143,8 +143,21 @@
set to $name
set to_addr [contact::email -party_id $party_id]
if {[empty_string_p $to_addr]} {
- ad_return_error [_ contacts.Error] [_ contacts.lt_there_was_an_error_processing_this_request]
- break
+ # We are going to check if this party_id has an employer and if this
+ # employer has an email
+ set employer_id [relation::get_object_two -object_id_one $party_id \
+ -rel_type "contact_rels_employment"]
+ if { ![empty_string_p $employer_id] } {
+ # Get the employer email adress
+ set to_addr [contact::email -party_id $employer_id]
+ if {[empty_string_p $to_addr]} {
+ ad_return_error [_ contacts.Error] [_ contacts.lt_there_was_an_error_processing_this_request]
+ break
+ }
+ } else {
+ ad_return_error [_ contacts.Error] [_ contacts.lt_there_was_an_error_processing_this_request]
+ break
+ }
}
set values [list]
set locale [lang::user::site_wide_locale -user_id $party_id]
Index: openacs-4/packages/contacts/www/message.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/message.adp,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/contacts/www/message.adp 10 Sep 2005 13:39:04 -0000 1.12
+++ openacs-4/packages/contacts/www/message.adp 28 Sep 2005 22:14:00 -0000 1.13
@@ -15,12 +15,15 @@
comment_add.comment
+
+ #contacts.This_contact_doesnt#
+
+
-