Passing parameters to mail and sending two different mails

Hi, everyone,
I have two questions for you. In our RT instance we want to
automatically process some incident reports with well defined structure.
Receiving and parsing is easy but I am lost on how to

  1. pass the parsed data to mail template.
    I know that I could create custom fields for each piece of data and then
    retrieve it from template, but I find it quite cumbersome - more than
    70% of tickets would have custom fields they are not going to use.
    Unless I make it some generic custom field that can store any string and
    keep the entire mail there, which would kind of defeat the purpose of a
    template.

  2. send two different mails
    One mail is an automatic reply to the requestor and the other one is a
    mail to an admin responsible for handling the incident. I could make two
    scrips with the same condition to send mails or to use/extend
    RT::Action::SendMail.
    Which option would you prefer? Or is there a third or fourth one?

Thank you for your answers

Regards
Martin

Mgr. Martin Drasar drasar@ics.muni.cz
CSIRT-MU, Network Security Department CSIRT-MU
Institute of Computer Science, Masaryk University, Brno, Czech Republic
PGP Key ID: 0x944BC925

  1. pass the parsed data to mail template.
    I know that I could create custom fields for each piece of data and then
    retrieve it from template, but I find it quite cumbersome - more than
    70% of tickets would have custom fields they are not going to use.
    Unless I make it some generic custom field that can store any string and
    keep the entire mail there, which would kind of defeat the purpose of a
    template.

You can make a single custom field and not grant normal users
SeeCustomField and only manage it from Scrips

  1. send two different mails
    One mail is an automatic reply to the requestor and the other one is a
    mail to an admin responsible for handling the incident. I could make two
    scrips with the same condition to send mails or to use/extend
    RT::Action::SendMail.
    Which option would you prefer? Or is there a third or fourth one?

Sounds like you just want
On Create Autoreply to Requestors with your custom template
On Create Notify AdminCcs with another custom template

Since both of those scrips exist, you’d just make custom templates for
them

-kevin

Hi Martin,

Hi, everyone,
I have two questions for you. In our RT instance we want to
automatically process some incident reports with well defined structure.
Receiving and parsing is easy but I am lost on how to

  1. pass the parsed data to mail template.
    I know that I could create custom fields for each piece of data and then
    retrieve it from template, but I find it quite cumbersome - more than
    70% of tickets would have custom fields they are not going to use.
    Unless I make it some generic custom field that can store any string and
    keep the entire mail there, which would kind of defeat the purpose of a
    template.

You can do the parsing/processing within the template. I actually do
more processing in my mail templates than in the scrips. From within
the template you have access to the transaction that triggered the scrip
and the ticket.

  1. send two different mails
    One mail is an automatic reply to the requestor and the other one is a
    mail to an admin responsible for handling the incident. I could make two
    scrips with the same condition to send mails or to use/extend
    RT::Action::SendMail.
    Which option would you prefer? Or is there a third or fourth one?

I just use 2 scrips with the same condition.

Gene