OnWebCorrespond: Difference between revisions
Jump to navigation
Jump to search
(Adding categories) |
m (3 revisions imported) |
(No difference)
|
Latest revision as of 15:15, 6 April 2016
Question - in an OnCorrespond scrip, how can you determine if the reply is from an incoming email message or from the web interface?
Here's a custom scrip condition that checks for a "Received" header in the message - if there is one, we assume we're dealing with email. If not, it's a reply entered in the web interface.
This code will cause the scrip to proceed if we're dealing with a web interface reply.
my $trans = $self->TransactionObj; # OnCorrespond: return 0 unless $trans->Type eq "Correspond"; # Get the message attachment my $msgattr = $trans->Message->First; return 1 unless $msgattr; # no message attachment - assume web UI return 0 if $msgattr->GetHeader('Received'); # email message return 1;
Steve Turner 5/19/05
See also AnyTransactionSource.