- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2014 12:27 PM
Hi Everyone,
We've got a buncha of inbound rules to turn emails into New Call records from our various support mailboxes. For one particular mailbox, they'd like to exclude emails from non @abc.com domains from being created into tickets. I thought I had it right, but it's not working and I dunno what I'm doing wrong or why.
email.to.toLowerCase().indexOf('facilities@abc.com') > -1
&&
email.from.toLowerCase().indexOf('@abc.com') > -1
My understanding is that, that should process when the email is sent to facilities@abc.com AND the email is from @abc.com. Clearly thats not the case or at least not happening.
Also, for the email.to.toLowerCase().indexOf, does that cover whether the facilities@abc.com is on the TO or the CC line?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2014 06:10 AM
Ugh, I had the wiki opened to that page - not sure why I didn't just look that up. But you make great points all around. In relation to the initial problem, the syntax was right, turns out it I was just using the wrong email address - DOH! should have been facility not facilities.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2014 03:58 PM
According to this, the email.to object has both TO and CC:
You could also use email.recipients instead.
On the same note, you might want to use email.origemail instead of email.from as there are conditions under which the email.from might not have what you are looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2014 06:10 AM
Ugh, I had the wiki opened to that page - not sure why I didn't just look that up. But you make great points all around. In relation to the initial problem, the syntax was right, turns out it I was just using the wrong email address - DOH! should have been facility not facilities.