[rt-users] Obtaining the first Attachment in a scrip
Barry L. Kline
blkline at attglobal.net
Thu Jun 22 14:00:59 EDT 2006
I use DSPAM to catch SPAM coming through my e-mail server. DSPAM
"learns" what SPAM looks like by example -- you tell it what is SPAM and
what is HAM. DSPAM tags each email with an ID that lets it reverse
entries. Any time you receive an email that has been misclassified you
can send it back to DSPAM and it will learn from its mistakes.
That said, I get email to some of my RT queues that are SPAM. DSPAM has
them classified as good, and I want an easy way for my users to be able
to ship them back for reclassification. The way I thought about doing
that was by making a simple "SPAM" queue, then instructing my users to
simply altering the queue of a misclassified messages to Spam. In the
scrips section of my Spam queue I want to use "On Queue Change" to
notify the AdminCC (which is a bogus user with an email adress that will
route back to DSPAM). My problem is that I need the original
attachment, so $Transaction->Content will not fit the bill. To do that,
I need the first attachment.
I created a template called FirstAttachment that contains only the
following code:
{$self->TransactionObj->Attachments->First->Content}
which from my Googling and searching through the mailing list would seem
to return what I want. Instead of an email being sent, nothing is. If
I choose a different template then the expected email gets sent.
Is the code I listed above what I'm looking for? e.g. Should this
return the first attachment (the original email) of my ticket?
Thanks in advance for your assistance.
Barry
More information about the rt-users
mailing list