[rt-users] differentiate tickets created by rt-mailgate

Stephen Turner sturner at MIT.EDU
Tue Jun 13 09:42:58 EDT 2006


At Monday 6/12/2006 11:06 PM, Luke Vanderfluit wrote:
>Hi.
>
>I need to find out which tickets have been created by emails sent in to RT.
>I'm thiking maybe I can add an attribute value with rt-mailgate, 
>haven't checked the API yet.
>Anyone know of a way to do this?
>
>Thanks.
>Kind regards.
>

We have a condition that goes in a scrip to determine this. The code 
assumes that if the first attachment on a create transaction has a 
'Received' header, it's an email create. The code (from the 
condition) is something like this:

     my $msgattr = $self->TransactionObj->Message->First;
     if ( $msgattr and $msgattr->GetHeader('Received') ) {
           # It's an email creation
     }

It seems to work OK. You could use this in a scrip to set a custom 
field or whatever.

Steve




More information about the rt-users mailing list