I’m trying to set up an agent to reply to a particular set of inbound emails. I’d like the reply to be from my Drafts folder. No substitution of information is required, I just want to send the email as is.
Is it possible to do this via an agent? If so, can you give me a pointer or two, please?
Subject: Can be done
Yes you can but a bit of work is required though. All the drafts can be accessed from the ($Drafts) view in your mailbox.
First an agent which does a getDocumentBykey on this view, which should give you the handle of the draft mail.
And then you can specify that the agent should run on selected docs in the Inbox view, that ways you can select the mails and click on agent. Also by looping through the selected documents you can get the return email addresses so you know which email addresses need to receive your email.
The problem that i can see here would be the fact that the ($Drafts) view has some columns at the start of the view which might cause issues with the getDocumentBykey. A way around would be to take a copy of the view and keep the subject as the value for first column. The first column is sorted and the subject of the mail that you want to send should be unique. The value of the subject is also your key. So technically the draft mail stays in the draft view but is accessed from another back end view for programmatic purposes.
Regards,
Sayan