Max Ingrosso
Max Ingrosso

Reputation: 63

Tracking response to an email

I need to send via agent some emails and I want to track the responses to these emails with an agent on the mailbox of the user.

Is there any field I can use to set/read to achieve this?

The flow:
1) the user create a document in a database (on the web);
2) the WebQuerySave agent creates the email, saves it in a mail-in db and sends it to the recipient;
3) the recipent sends a reply;
4) an agent on the mail-in db should read this reply and write some data back to the original document made by the user... and that's what I'm trying to do and I can't rely on the subject because it's all on the final users hands...

Is there any way I can do it?

Thanks for any advice.

Upvotes: 1

Views: 163

Answers (1)

Richard Schwartz
Richard Schwartz

Reputation: 14628

Since you are dealing with outside recipients and can't control the software that they use or how they use it, it is going to be difficult to handle 100% of cases. You are going to need to build a mechanism into your solution for marking exception cases where automatic matching fails so that someone can handle them manually.

That said, you can set a special flag in your outgoing mail. Assuming that your webQuerySave agent uses mailDoc as the object name for the NotesDocument that it is going to mail, just do this:

mailDoc.ReplaceItemValue("mySpecialFlag",evaluate("@unique"))

In order to get this value to go out in the email, you are going to have to make sure that the Domino server that performs the conversion from Notes format to SMTP is configured with the outbound MIME option to "send Notes private items", which is described here. This will create a custom x-notes-item header in the outbound message, and as long as the receiving email system preserves it and copies it into the end-user's reply message, that header will be received back by Domino and converted into an ordinary NotesItem that your agent in the mail-in database can look for. I think that most ordinary mail software will preserve this header for you in replies, but you will need to be handle cases where the haeder doesn't come back either because the outside mail system's software doesn't preserve it or because the user creates a new message and copies the old one into it instead of doing a normal reply.

Upvotes: 1

Related Questions