Forum OpenACS Development: Response to BBoard development

Collapse
Posted by Henry Minsky on
I wrote the original "email-handler" code that was used in the ticket tracker to allow users to respond by email to the ticket system.

When a new ticket is assigned to a user or an already asigned ticket's state changed, the ticket system sends out email with the ticket id in the subject line (like "Coffee pot is broken again (TR#1023)"), and a reply-to address of an alias that handled incoming mail with a perl/DBI script.

If you replied to the email (and your mailer preserved the subject line), it would get shoved into the database
using the "email-handler" into a big queue, tagged with the
a symbol saying which app it was destined for. Then a periodic
daemon would sweep the queue and call the appropriate module-specific
email-handler proc for each message.

You could also play qmail games with the reply-to address to encode the ticket id in the email address itself, although we didn't implement this (but we did implement something similar for handling
bounced email intelligently by encoding the user_id in the envelope return path address, in the "bulkmail" module).

Anyway, it worked fine, and still works in ACS 3.4, I believe, if you enable
email handling and set up your qmail aliases.

We could make this work for bboard in almost exactly the same
way as it works for ticket tracker.

I don't think it's desirable to drag Java into the email handling, it is simple enough to be done in Tcl. There might be some border cases where simple minded parsing of the message doesn't really work, but
in most cases the simple minded approach seems to work.