OnCreateFromEmail: Difference between revisions
Jump to navigation
Jump to search
(Adding categories) |
mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
This scrip is based on [[OnWebCorrespond]] and has been tested with RT 3.6.0. | This scrip is based on [[OnWebCorrespond]] and has been tested with RT 3.6.0. | ||
< | <pre> | ||
# Custom condition to autoreply only when a ticket is created via email | |||
# Written by Rob Lemley <rob@slide.com> 2006-08-09 | # Written by Rob Lemley <rob@slide.com> 2006-08-09 | ||
# Based on "OnWebCorrespond" | # Based on "OnWebCorrespond" | ||
Line 20: | Line 21: | ||
return 0; | return 0; | ||
</pre> | |||
</ | |||
See also [[AnyTransactionSource]] | See also [[AnyTransactionSource]] | ||
[[Category:RT Condition]] | [[Category:RT Condition]] |
Latest revision as of 13:13, 13 August 2016
We wanted to be able to send out autoreply emails only when a ticket is created by the end user sending an email. Emails are not sent when a ticket is created by an agent through the web interface.
This scrip is based on OnWebCorrespond and has been tested with RT 3.6.0.
# Custom condition to autoreply only when a ticket is created via email # Written by Rob Lemley <rob@slide.com> 2006-08-09 # Based on "OnWebCorrespond" # http://wiki.bestpractical.com/index.cgi?OnWebCorrespond my $trans = $self->TransactionObj; return 0 unless $trans->Type eq "Create"; my $msgattr = $trans->Message->First; return 0 unless $msgattr; return 1 if $msgattr->GetHeader('Received'); return 0;
See also AnyTransactionSource