Posting directly into RT via external web application

Apologies if this is covered in the archives somewhere, but my search-fu
resulted in pages of completely unrelated topics.

We’re going to be using a queue in RT to handle applications sent in for
positions. Right now, we’ve got a nice web interface which gathers all
the information from someone, including a few attachments they can
upload. The next step is getting the data into RT.

The “simple” way, or so we thought, would be to email the data from the
web server, setting the From: address to the applicant’s email. They’ll
get the autoresponse, and will be notified of changes to their
application in the future. However, the person responsible for coding
up the frontend has hit a couple snags, and just asked me if it’s
possible to post this directly to RT without using email (XML-RPC or
something like it).

The web server that the applicant will see is Internet-facing, while RT
is not (separate machines), so whatever would need to be done needs to
be over the network. Any ideas? I know the mailgate does something
similar, so it’s in theory possible, I just don’t know how well it could
be applied (and if I can have custom fields populated at the same time,
that would be even better).

Thanks!

Steve Huston - W2SRH - Unix Sysadmin, Dept. of Astrophysical Sciences
Princeton University | ICBM Address: 40.346525 -74.651285
126 Peyton Hall |“On my ship, the Rocinante, wheeling through
Princeton, NJ 08544 | the galaxies; headed for the heart of Cygnus,
(609) 258-7375 | headlong into mystery.” -Rush, ‘Cygnus X-1’

At Wednesday 5/23/2007 02:36 PM, Steve Huston wrote:

Apologies if this is covered in the archives somewhere, but my search-fu
resulted in pages of completely unrelated topics.

We’re going to be using a queue in RT to handle applications sent in for
positions. Right now, we’ve got a nice web interface which gathers all
the information from someone, including a few attachments they can
upload. The next step is getting the data into RT.

The “simple” way, or so we thought, would be to email the data from the
web server, setting the From: address to the applicant’s email. They’ll
get the autoresponse, and will be notified of changes to their
application in the future. However, the person responsible for coding
up the frontend has hit a couple snags, and just asked me if it’s
possible to post this directly to RT without using email (XML-RPC or
something like it).

The web server that the applicant will see is Internet-facing, while RT
is not (separate machines), so whatever would need to be done needs to
be over the network. Any ideas? I know the mailgate does something
similar, so it’s in theory possible, I just don’t know how well it could
be applied (and if I can have custom fields populated at the same time,
that would be even better).

Thanks!

Steve,

You can definitely have your web form send email to RT, generate
tickets, and have custom fields populated (via an RT extension). I’m
curious about what the snags are that make email not possible.

Steve

You can definitely have your web form send email to RT, generate
tickets, and have custom fields populated (via an RT extension). I’m
curious about what the snags are that make email not possible.

Not impossible, just partially more painful and definitely another layer
of abstraction between stages. It would be preferred if we can have
some kind of result sent back to the web user other than “The email went
out to the other server, you should hear from it shortly”, and I’d
imagine that a backend call could make that more possible.

Since sending that email, I remembered REST, and have pointed him at
that (as well as the source to ‘rt’ and ‘rt-mailgate’). So far he’s
happy :>

Steve Huston - W2SRH - Unix Sysadmin, Dept. of Astrophysical Sciences
Princeton University | ICBM Address: 40.346525 -74.651285
126 Peyton Hall |“On my ship, the Rocinante, wheeling through
Princeton, NJ 08544 | the galaxies; headed for the heart of Cygnus,
(609) 258-7375 | headlong into mystery.” -Rush, ‘Cygnus X-1’

Just extract the web user’s email address from the
$self->TransactionObj->Content with an OnCreate scrip and then have RT send
an acknowledgment to that address. Letting RT handle this is pretty
simple, especially since your webdude gets to define the format of the
e-mail that gets sent to RT. I’d still have the web server respond with a
"Thanks for the application, stand by for an acknowledgement" screen, but
then have RT send him/her a nicer customized message.

Gene

At 12:16 PM 5/23/2007, Steve Huston wrote:>On 05/23/2007 03:10 PM, Stephen Turner wrote:

You can definitely have your web form send email to RT, generate
tickets, and have custom fields populated (via an RT extension). I’m
curious about what the snags are that make email not possible.

Not impossible, just partially more painful and definitely another layer
of abstraction between stages. It would be preferred if we can have
some kind of result sent back to the web user other than “The email went
out to the other server, you should hear from it shortly”, and I’d
imagine that a backend call could make that more possible.

Since sending that email, I remembered REST, and have pointed him at
that (as well as the source to ‘rt’ and ‘rt-mailgate’). So far he’s
happy :>


Steve Huston - W2SRH - Unix Sysadmin, Dept. of Astrophysical Sciences
Princeton University | ICBM Address: 40.346525 -74.651285
126 Peyton Hall |“On my ship, the Rocinante, wheeling through
Princeton, NJ 08544 | the galaxies; headed for the heart of Cygnus,
(609) 258-7375 | headlong into mystery.” -Rush, ‘Cygnus X-1’


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Gene LeDuc, GSEC
Security Analyst
San Diego State University

Steve Huston wrote:

Since sending that email, I remembered REST, and have pointed him at
that (as well as the source to ‘rt’ and ‘rt-mailgate’). So far he’s
happy :>

There’s also RT::Client::REST :

http://search.cpan.org/~dmitri/RT-Client-REST/

  • Dmitri.