After installing Bug Tracker, entering a ticket and subscribing to notifications I started to receive an email roughly every minute.
A study of the error log indicated that this was because an error was preventing the acs_mail_lite_queue being cleared. So the message was going out but a catch was logging an error and not deleting the message from the queue. Thus every sweep, the message goes out again.
I have spent about three hours now trawling the code to work out what is going on and can't get to the bottom of it.
Here is the error:
[25/Jul/2009:13:05:20][1791.81926][-sched:11-] Notice: dbinit: sql(localhost::webteamworks): '
select
message_id as id,
creation_date,
locking_server,
to_addr,
cc_addr,
bcc_addr,
from_addr,
reply_to,
subject,
body,
package_id,
file_ids,
mime_type,
(case when no_callback_p = TRUE then 1 else 0 end) as no_callback_p,
extraheaders,
(case when use_sender_p = TRUE then 1 else 0 end) as use_sender_p
from acs_mail_lite_queue
where locking_server = '' or locking_server is NULL
'
[25/Jul/2009:13:05:20][1791.81926][-sched:11-] Error: Error while sending queued mail: can't read "from_party_id": no such variable
[25/Jul/2009:13:05:20][1791.81926][-sched:11-] Error: Error while sending queued mail: can't read "from_party_id": no such variable
After nearly five hours of studying the code I have tracked the source of the log entry to the following in mail-tracking-callback-procs.tcl :
ad_proc -public -callback acs_mail_lite::send -impl mail_tracking {
{-package_id:required}
{-from_party_id:required}
{-to_party_id:required}
{-body:required}
{-message_id:required}
{-subject:required}
} {
create a new entry in the mail tracking table
} {
set log_id [mail_tracking::new -package_id $package_id \
-sender_id $from_party_id \
-recipient_ids $to_party_id \
-body $body \
-message_id $message_id \
-subject $subject]
}
As -from_party_id is a required value I am not clear why I am getting a "can't read" error rather than having ad_proc baulk at the lack of a value being passed in.
Now I have to try :
i) Hard coding a value to see if that solves the problem.
ii) To find the calling proc to establish why the value doesn't get passed in.
Richard