Index: openacs-4/packages/project-manager/tcl/project-manager-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/project-manager-procs.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/project-manager/tcl/project-manager-procs.tcl 7 Jan 2006 07:21:16 -0000 1.10 +++ openacs-4/packages/project-manager/tcl/project-manager-procs.tcl 30 Jan 2006 17:55:34 -0000 1.11 @@ -436,23 +436,17 @@ } # now send out email - + if {[string equal $send_email_p t]} { # task if {[string equal $type task]} { - if { [exists_and_not_null $to]} { - set assignees $to - } else { - set assignees [pm::task::assignee_email_list -task_item_id $object_id] - } + set assignees $to if {[llength $assignees] > 0} { - set to_address $assignees - set from_address [db_string get_from_email "select email from parties where party_id = :user_id" -default "nobody@nowhere.com"] set task_url [pm::task::get_url $object_id] @@ -467,13 +461,17 @@ set project_item_id [pm::task::project_item_id -task_item_id $object_id] - pm::util::email \ - -to_addr $to_address \ - -from_addr $from_address \ - -subject $subject \ - -body $content \ - -mime_type "text/html" \ - -object_id "$project_item_id" + foreach to_address $assignees { + acs_mail_lite::complex_send \ + -send_immediately \ + -to_addr "$to_address" \ + -from_addr "$from_address" \ + -subject "$subject" \ + -body $content \ + -mime_type "text/html" \ + -object_id "$project_item_id" \ + -no_callback_p + } } } @@ -482,16 +480,10 @@ if {[string equal $type project]} { - if { [exists_and_not_null $to]} { - set assignees $to - } else { - set assignees [pm::project::assignee_email_list -project_item_id $object_id] - } + set assignees $to if {[llength $assignees] > 0} { - set to_address $assignees - set from_address [db_string get_from_email "select email from parties where party_id = :user_id" -default "nobody@nowhere.com"] set project_url [pm::project::url \ @@ -505,14 +497,19 @@ set content "$title

$comment_html" - - pm::util::email \ - -to_addr $to_address \ - -from_addr $from_address \ - -subject $subject \ - -body $content \ - -mime_type "text/html" \ - -object_id "$object_id" + + foreach to_address $assignees { + acs_mail_lite::complex_send \ + -send_immediately \ + -to_addr "$to_address" \ + -from_addr "$from_address" \ + -subject "$subject" \ + -body $content \ + -mime_type "text/html" \ + -object_id "$object_id" \ + -no_callback_p + } + } }