Index: openacs-4/packages/acs-messaging/acs-messaging.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/acs-messaging.info,v
diff -u -r1.29 -r1.29.2.1
--- openacs-4/packages/acs-messaging/acs-messaging.info 13 May 2009 21:29:33 -0000 1.29
+++ openacs-4/packages/acs-messaging/acs-messaging.info 15 May 2009 13:34:58 -0000 1.29.2.1
@@ -21,8 +21,9 @@
prefered packages for delivering this functionality and it is anticipated that this package will ultimately be deprecated.
-
+
+
Index: openacs-4/packages/acs-messaging/tcl/acs-messaging-init.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/tcl/acs-messaging-init.tcl,v
diff -u -r1.2 -r1.2.20.1
--- openacs-4/packages/acs-messaging/tcl/acs-messaging-init.tcl 10 Sep 2002 22:22:10 -0000 1.2
+++ openacs-4/packages/acs-messaging/tcl/acs-messaging-init.tcl 15 May 2009 13:34:58 -0000 1.2.20.1
@@ -8,7 +8,6 @@
}
-# Schedule every 15 minutes. Its own thread. since ns_sendmail does
-# network activity.
+# Schedule every 15 minutes
ad_schedule_proc -thread t 900 acs_messaging_process_queue
Index: openacs-4/packages/acs-messaging/tcl/acs-messaging-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/tcl/acs-messaging-procs-postgresql.xql,v
diff -u -r1.5 -r1.5.22.1
--- openacs-4/packages/acs-messaging/tcl/acs-messaging-procs-postgresql.xql 3 Jun 2001 11:05:40 -0000 1.5
+++ openacs-4/packages/acs-messaging/tcl/acs-messaging-procs-postgresql.xql 15 May 2009 13:34:58 -0000 1.5.22.1
@@ -50,7 +50,6 @@
where o.message_id = m.message_id
and p.party_id = m.sender
and wait_until <= current_timestamp
-
Index: openacs-4/packages/acs-messaging/tcl/acs-messaging-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/tcl/acs-messaging-procs.tcl,v
diff -u -r1.6 -r1.6.2.1
--- openacs-4/packages/acs-messaging/tcl/acs-messaging-procs.tcl 29 Dec 2008 22:06:36 -0000 1.6
+++ openacs-4/packages/acs-messaging/tcl/acs-messaging-procs.tcl 15 May 2009 13:34:58 -0000 1.6.2.1
@@ -140,49 +140,18 @@
} {
Process the message queue, sending any reasonable messages.
} {
- db_foreach acs_message_send {
- select o.message_id as sending_message_id,
- o.to_address as recip_email,
- p.email as sender_email,
- to_char(m.sent_date, 'Dy, DD Mon YYYY HH24:MI:SS') as sent_date,
- m.rfc822_id,
- m.title,
- m.mime_type,
- m.content,
- m2.rfc822_id as in_reply_to
- from acs_messages_outgoing o,
- acs_messages_all m,
- acs_messages_all m2,
- parties p
- where o.message_id = m.message_id
- and m2.message_id(+) = m.reply_to
- and p.party_id = m.sender
- and wait_until <= sysdate
- } {
- # Need to process content to do CRLF conversions?
- set headers [ns_set create]
-
- ns_set put $headers Sender [parameter::get -parameter OutgoingSender]
- if {$in_reply_to ne "" } {
- ns_set put $headers In-Reply-To "<$in_reply_to>"
- }
- ns_set put $headers Message-ID "<$rfc822_id>"
- ns_set put $headers Date "$sent_date [acs_messaging_timezone_offset]"
- ns_set put $headers MIME-Version "1.0"
- ns_set put $headers Content-Type $mime_type
- ns_log "Notice" "About to send"
+ db_foreach acs_message_send {} {
if {![catch {
- ns_sendmail $recip_email $sender_email $title $content $headers
+ acs_mail_lite::send -send_immediately \
+ -to_addr $recip_email \
+ -from_addr $sender_email \
+ -subject $title \
+ -body $content
} errMsg]} {
- ns_log "Notice" "Sending"
# everything went well, dequeue
- db_dml acs_message_remove_from_queue {
- delete from acs_messages_outgoing
- where message_id = :sending_message_id
- and to_address = :recip_email
- }
+ db_dml acs_message_remove_from_queue {}
} else {
- ns_log "Notice" "Not sending: $errMsg"
+ ns_log "Error" "acs-messaging: Error processing queue: $errMsg"
}
}
}