Index: openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.tcl,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.tcl 10 Dec 2002 20:06:32 -0000 1.8 +++ openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.tcl 8 Mar 2004 19:46:11 -0000 1.9 @@ -11,18 +11,14 @@ @revision-date April 2002 } -ad_proc -deprecated ec_sendmail_from_service { +ad_proc ec_sendmail_from_service { email_to reply_to email_subject email_body {additional_headers ""} {bcc ""} } { - This is deprecated. It is qmail-specific. See acs-mail-lite package. - - @see acs_mail_lite::send - Use this when you're sending out customer service emails. It's invoked just like ns_sendmail, except that the email will always be from the customer service email address. The reply-to field @@ -105,10 +101,9 @@ # Create a customer service issue/interaction/action - set user_identification_and_issue_id - [ec_customer_service_simple_issue "" "automatic" "email" \ - "To: $email\nFrom: [ad_parameter -package_id [ec_id] CustomerServiceEmailAddress ecommerce]\nSubject: $email_subject" \ - $order_id $issue_type_list $email_body $user_id] + set user_identification_and_issue_id [ec_customer_service_simple_issue "" "automatic" "email" \ + "To: $email\nFrom: [ad_parameter -package_id [ec_id] CustomerServiceEmailAddress ecommerce]\nSubject: $email_subject" \ + $order_id $issue_type_list $email_body $user_id] set user_identification_id [lindex $user_identification_and_issue_id 0] set issue_id [lindex $user_identification_and_issue_id 1] @@ -126,9 +121,8 @@ } set email_from [ec_customer_service_email_address $user_identification_id $issue_id] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr "$email" -from_addr "$from_name" -subject "$email_subject" -body "$email_body" - + + ec_sendmail_from_service "$email" "$email_from" "$email_subject" "$email_body" ec_email_product_notification $order_id } } @@ -140,7 +134,7 @@ require it. } { - set order_link [ec_securelink "[ec_url]admin/orders/one?[export_url_vars order_id]"] + set order_link [ec_securelink "[ad_url][ec_url]admin/orders/one?[export_url_vars order_id]"] db_foreach notification_select { select ep.email_on_purchase_list, ep.product_name @@ -150,9 +144,8 @@ group by ep.email_on_purchase_list, ep.product_name } { set email_from [ec_customer_service_email_address] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr $email_on_purchase_list -from_addr $from_name -subject "An order for $product_name" -body " -A order for $product_name has been placed at [ec_system_name]. + ec_sendmail_from_service $email_on_purchase_list $email_from "An order for $product_name" " +An order for $product_name has been placed at [ec_system_name]. The order can be viewed at: @@ -217,8 +210,7 @@ } set email_from [ec_customer_service_email_address $user_identification_id $issue_id] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr "$email" -from_addr "$from_name" -subject "$email_subject" -body "$email_body" + ec_sendmail_from_service "$email" "$email_from" "$email_subject" "$email_body" } } @@ -310,8 +302,7 @@ (:user_identification_id, 2, :order_id, :shipment_id, sysdate)" } set email_from [ec_customer_service_email_address $user_identification_id $issue_id] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr "$email" -from_addr "$from_name" -subject "$email_subject" -body "$email_body" + ec_sendmail_from_service "$email" "$email_from" "$email_subject" "$email_body" } } @@ -377,8 +368,8 @@ } set email_from [ec_customer_service_email_address $user_identification_id $issue_id] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr "$email" -from_addr "$from_name" -subject "$email_subject" -body "$email_body" + + ec_sendmail_from_service "$email" "$email_from" "$email_subject" "$email_body" } } @@ -460,8 +451,7 @@ } set email_from [ec_customer_service_email_address $user_identification_id $issue_id] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr "$email" -from_addr "$from_name" -subject "$email_subject" -body "$email_body" + ec_sendmail_from_service "$email" "$email_from" "$email_subject" "$email_body" } } @@ -574,7 +564,6 @@ (:user_identification_id, 5, :gift_certificate_id, sysdate)" } set email_from [ec_customer_service_email_address $user_identification_id $issue_id] - set from_name "\"[ad_parameter -package_id [ec_id] CustomerServiceEmailDescription ecommerce]\" <$email_from>" - acs_mail_lite::send -to_addr "$email" -from_addr "$from_name" -subject "$email_subject" -body "$email_body" + ec_sendmail_from_service "$email" "$email_from" "$email_subject" "$email_body" } }