On Fri, 2007-09-14 at 09:35 -0700, Gene LeDuc wrote:
> Hi Phil,
> 
> To correct my previous post, try this for your condition code:
> 
>    my $ReqList =
> $self->TicketObj->Requestors->MemberEmailAddressesAsString;
>    my $Sender = $self->TransactionObj->CreatorObj->EmailAddress;
>    return $self->TransactionObj->Type eq "Correspond"
>       && $self->TicketObj->Status eq "reqappr"
>       && $ReqList =~ /$Sender/;
> 
> You just grab the list of requestor e-mail addresses and see if the 
> sender's address is one of them.
> 

ObPerlPedant: That'll still be a little loose, you might want to anchor
your regex. If your sender is "[EMAIL PROTECTED]" the code below
would still match "[EMAIL PROTECTED]" -- a corner case,
yes, but one with a nonzero chance of occurring given the way people
tend to construct accounts at some of the free webmail providers.

A quick'n'dirty fix might be something like this:

$ReqList =~ /^(.*,)$Sender[,$]/;
        
-- 
/Ole Craig
Security Engineer
Team lead, customer support

[EMAIL PROTECTED]
303-381-3802 main support line
303-381-3824 my voicemail
303-381-3880 fax

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Reply via email to