Index: openacs-4/packages/mail-tracking/lib/messages.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/mail-tracking/lib/messages.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/mail-tracking/lib/messages.tcl 17 Oct 2005 12:47:56 -0000 1.15 +++ openacs-4/packages/mail-tracking/lib/messages.tcl 17 Oct 2005 22:27:58 -0000 1.16 @@ -163,9 +163,23 @@ db_multirow -extend { file_ids object_url sender receiver package_name package_url url_message_id download_files} messages select_messages {} { set sender "" set receiver "" - catch { set sender [person::name -person_id $sender_id] } errMsg - catch { set receiver [person::name -person_id $recipient_id]} errMsg - + if { [catch { set sender [person::name -person_id $sender_id] } errMsg] } { + # We will try to see if it's a contact and has an email. This will break + # if the contacts package is not installed so this is why we need to put + # it inside a catch + if { [catch { set sender [contact::email -party_id $sender_id] } errorMsg] } { + set sender "" + } + } + if { [catch { set receiver [person::name -person_id $recipient_id]} errMsg] } { + # We will try to see if it's a contact and has an email. This will break + # if the contacts package is not installed so this is why we need to put + # it inside a catch + if { [catch { set receiver [contact::email -party_id $recipient_id] } errorMsg] } { + set receiver "" + } + } + if {[exists_and_not_null $package_id]} { set package_name [apm_instance_name_from_id $package_id] set package_url [apm_package_url_from_id $package_id] Index: openacs-4/packages/mail-tracking/www/one-message.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/mail-tracking/www/one-message.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/mail-tracking/www/one-message.tcl 17 Oct 2005 12:47:56 -0000 1.3 +++ openacs-4/packages/mail-tracking/www/one-message.tcl 17 Oct 2005 22:27:37 -0000 1.4 @@ -30,11 +30,22 @@ db_1row get_message_info { } if { [catch { set sender [person::name -person_id $sender_id] } errorMsg] } { - set sender "" + # We will try to see if it's a contact and has an email. This will break + # if the contacts package is not installed so this is why we need to put + # it inside a catch + if { [catch { set sender [contact::email -party_id $sender_id] } errorMsg] } { + set sender "" + } } if { [catch { set recipient [person::name -person_id $recipient_id] } errMsg] } { + # We will try to see if it's a contact and has an email. This will break + # if the contacts package is not installed so this is why we need to put + # it inside a catch set recipient "" + if { [catch { set recipient [contact::email -party_id $recipient_id] } errorMsg] } { + set recipient "" + } } # We get the related files