Index: openacs-4/packages/contacts/lib/contacts.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contacts.tcl,v diff -u -r1.38 -r1.39 --- openacs-4/packages/contacts/lib/contacts.tcl 31 Dec 2005 07:39:39 -0000 1.38 +++ openacs-4/packages/contacts/lib/contacts.tcl 29 Jan 2006 16:09:49 -0000 1.39 @@ -137,9 +137,12 @@ } append name_label [join $page_size_list " | "] +################ +# disabled csv download here +################ +# append name_label "   [_ contacts.Get]: [_ contacts.CSV]" +set format normal -append name_label "   [_ contacts.Get]: [_ contacts.CSV]" - template::multirow create bulk_acts pretty link detailed template::multirow append bulk_acts "[_ contacts.Add_to_Group]" "${base_url}group-parties-add" "[_ contacts.Add_to_group]" template::multirow append bulk_acts "[_ contacts.Remove_From_Group]" "${base_url}group-parties-remove" "[_ contacts.lt_Remove_from_this_Grou]" Index: openacs-4/packages/contacts/lib/email.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/email.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/contacts/lib/email.tcl 3 Jan 2006 22:14:55 -0000 1.15 +++ openacs-4/packages/contacts/lib/email.tcl 29 Jan 2006 16:09:49 -0000 1.16 @@ -203,11 +203,11 @@ foreach party_id $to { # Differentiate between person and organization - if {[person::person_p -party_id]} { + if {[person::person_p -party_id $party_id]} { contact::employee::get -employee_id $party_id -array employee set first_names $employee(first_names) set last_name $employee(last_name) - set name "$employee(title) $first_names $last_name" + set name "$employee(person_title) $first_names $last_name" set salutation $employee(salutation) set locale $employee(locale) set to_addr $employee(email) @@ -240,6 +240,7 @@ } } + # Send the email to all CC in cc_list foreach email_addr $cc_list { set name $email_addr @@ -272,10 +273,10 @@ template::multirow foreach messages { lappend to_list [list $to_addr] - + if {[exists_and_not_null file_ids]} { # If the no_callback_p is set to "t" then no callback will be executed - if { $no_callback_p } { + if { $no_callback_p ne "f" } { acs_mail_lite::complex_send \ -to_addr $to_addr \ @@ -290,6 +291,8 @@ } else { + + acs_mail_lite::complex_send \ -to_addr $to_addr \ -from_addr "$from_addr" \ @@ -311,6 +314,7 @@ if { $no_callback_p } { # If the no_callback_p is set to "t" then no callback will be executed + acs_mail_lite::complex_send \ -to_addr $to_addr \ -from_addr "$from_addr" \ @@ -362,8 +366,9 @@ } else { if { $no_callback_p } { + # If the no_callback_p is set to "t" then no callback will be executed - acs_mail_lite::send \ + acs_mail_lite::complex_send \ -to_addr $to_addr \ -from_addr "$from_addr" \ -subject "$subject" \ @@ -372,7 +377,7 @@ -no_callback_p } else { - acs_mail_lite::send \ + acs_mail_lite::complex_send \ -to_addr $to_addr \ -from_addr "$from_addr" \ -subject "$subject" \ Index: openacs-4/packages/contacts/lib/oo_mailing.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/oo_mailing.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/contacts/lib/oo_mailing.tcl 3 Jan 2006 22:14:55 -0000 1.5 +++ openacs-4/packages/contacts/lib/oo_mailing.tcl 29 Jan 2006 16:09:49 -0000 1.6 @@ -137,11 +137,14 @@ template::multirow create messages revision_id to_addr to_party_id subject content_body set file_revisions [list] + + # We need to set the original date here + set orig_date $date foreach party_id $party_ids { # get the user information if {[contact::employee::get -employee_id $party_id -array employee]} { - set date [lc_time_fmt [join [template::util::date::get_property linear_date_no_time $date] "-"] "%q" "$employee(locale)"] + set date [lc_time_fmt [join [template::util::date::get_property linear_date_no_time $orig_date] "-"] "%q" "$employee(locale)"] set regards [lang::message::lookup $employee(locale) contacts.with_best_regards] } else { ad_return_error [_ contacts.Error] [_ contacts.lt_there_was_an_error_processing_this_request] @@ -190,7 +193,6 @@ set salutation "Dear ladies and gentlemen" set locale [lang::user::site_wide_locale -user_id $party_id] } - set date [lc_time_fmt [dt_sysdate] "%q"] set values [list] foreach element [list first_names last_name name date salutation] { @@ -199,6 +201,7 @@ # We are going to create a multirow which knows about the file (revision_id) and contains # the parsed e-mail. + set to_addr [party::email -party_id $party_id] template::multirow append messages $revision_id $to_addr "" [contact::message::interpolate -text $subject -values $values] [contact::message::interpolate -text $email_content -values $values] } @@ -219,8 +222,7 @@ set package_id [ad_conn package_id] template::multirow foreach messages { - - ad_return_error "toaddr" "$to_addr" + # Send the e-mail to each of the users acs_mail_lite::complex_send \ -to_addr $to_addr \