Is there anyway to get a hold off the message-id of e-mail sent through the sendmail tag? Roché
Roch'e Compaan wrote:
Is there anyway to get a hold off the message-id of e-mail sent through the sendmail tag?
I would have thought the message-id would only get generated by the MTA once the sendmail tag has finished doing its thing :-( cheers, Chris
Is there anyway to get a hold off the message-id of e-mail sent through the sendmail tag?
As far as I can see, there isn't any generation of a message-id in the MailHost product. If you want to get a hold of the message-id, the right thing would probably be to generate it yourself, and adding it in the header field of the message you're sending.. I.e., something like this (untested): <dtml-call "REQUEST.set('message_id', _.str(_.whrandom.random()) + '@yourhost.com')"> <dtml-sendmail> To: <dtml-var mail_to> From: test@test.host Message-ID: <dtml-var mesage_id> </dtml-sendmail> Although using a message-id generated from one of the python library modules would be a better way of doing it.. HTH. -Morten
Is there anyway to get a hold off the message-id of e-mail sent through the sendmail tag?
As far as I can see, there isn't any generation of a message-id in the MailHost product. [snip]
Thanks for the suggestion, this is what I'm trying to do: We're building a customer relationship management system and one part of it is a request tracking system. For a particular request there can be many tasks assigned to various supporters. A supporter can give feedback to customer from a task assigned to him. If the customer replies to this task via e-mail I want to associate that message with the task where the feedback originated from but most e-mail clients discard custom headers but preserve a 'In-Reply-To' header with the original message-id. This is what I do currently: If the supporter sends feedback to the customer I send a copy of the mail back into zope to get the message-id generated by the MTA and then store the message with the approriate task. When the customer replies to this message I search a catalog for the original message-id via the 'In-Reply-To' header and then associate the reply with the correct task. In this way one can keep track of all correspondence on a specific task. If I can generate the message-id like you suggested then I don't have to send a copy of the message back into zope but can save a copy directly in Zope. Any other suggestions would be more than welcome. Roché
originated from but most e-mail clients discard custom headers but preserve a 'In-Reply-To' header with the original message-id.
Don't count on it! :) I spent quite some time working on a full-text mailing list search/archive system and one of the things I wanted to do was preserve thread informtion. However it was surprising the number of MUAs that did not generate a In-Reply-To header. Mostly it was Microsoft Mail Client and quite a few similar internal mail systems with internet gateways. Also beware that many mailers use the NNTP standard of References: instead of in-reply-to. I would suggest using the Subject line instead and generate some sort of ticket number and store it in the subject line, and put a header in the message body instructing the user to not alter the subject. -Matt -- Matt Hamilton matth@netsight.co.uk Netsight Internet Solutions, Ltd. Business Vision on the Internet http://www.netsight.co.uk +44 (0)117 9090901 Web Hosting | Web Design | Domain Names | Colocation | DB Integration
participants (4)
-
Chris Withers -
Matt Hamilton -
morten@esol.no -
Roch'e Compaan