<div dir="ltr"><div>Right,  I wasn't getting the email address. it works now.<br></div>Thanks<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 22, 2014 at 4:35 PM, Kevin Falcone <span dir="ltr"><<a href="mailto:falcone@bestpractical.com" target="_blank">falcone@bestpractical.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Wed, May 21, 2014 at 10:12:03PM -0400, Hugo Escobar wrote:<br>
> Hello,<br>
><br>
> I've been attempting to instruct rt to send emails 'On Correspond' to<br>
> 'Requestors' and 'Ccs',<br>
> only if the email address of the user generating the transaction matches a<br>
> predetermined list (@domain1 or @domain2)<br>
><br>
> Following, the code I wrote for the 'custom condition':<br>
><br>
> #--- begin code ---<br>
> if ( $self->TransactionObj->Type ne 'Create'<br>
>         &&<br>
>     !grep { $self->CurrentUser->EmailAddress =~ /$_$/ }<br>
>            ('@domain1','@domain2')<br>
> ) {<br>
>     return 0;<br>
> }<br>
><br>
> return 1;<br>
<br>
</div>RT->Logger->error($self->CurrentUser->EmailAddress); to see what the<br>
email address is.  It isn't who you think it is.  You want<br>
$self->TransactionObj->CreatorObj->EmailAddress<br>
<br>
Your check of ne 'Create' is also sort of non-sensical since it'll<br>
apply to transactions such as setting a status or changing a CF.<br>
<span class="HOEnZb"><font color="#888888"><br>
-kevin<br>
</font></span><br>--<br>
RT Training - Boston, September 9-10<br>
<a href="http://bestpractical.com/training" target="_blank">http://bestpractical.com/training</a><br></blockquote></div><br><br clear="all"><br>-- <br>Hugo Escobar<br><br><br><img title="AFS_logo.png" alt="AFS_logo.png" src="cid:ii_12ddc99660bf2d8d" height="35" width="171"><br>

<br>Follow us on Facebook and Linked-In<br clear="all"><br><a href="http://www.facebook.com/pages/Miami-FL/ASSOCIATION-FINANCIAL/64952991864" target="_blank"><img title="facebook-24x24.png" alt="facebook-24x24.png" src="cid:ii_12ddc9e6256d137a"></a> <a href="http://www.linkedin.com/companies/1006276" target="_blank"><img title="linkedin-24x24.png" alt="linkedin-24x24.png" src="cid:ii_12ddc9cb29a3a5d5"></a><br>


</div>