TrevorK
Mega Sage

How we initially setup handling multiple email addresses is simple. We had a single "New" rule that had a giant "if / else if" structure inside similar to this:

if (email.direct.toLowerCase().indexOf('myemail@myemail.com') != -1 || email.copied.toLowerCase.indexOf('myemail@myemail.com') {
....
}
else if (email.direct.toLowerCase().indexOf('another_one@myemail.com') != -1 || email.copied.toLowerCase.indexOf('another_one@myemail.com') {
....
}
else {
// This is our "catch all" and handles anything not specified above OR was BCC'ed
...
}

Now why we chose to use "indexOf" instead of a straight comparison I am unsure as that's how our consultant set it up many, many, many years ago.

 

We still use the above for most of the incoming messages but now we also use additional Inbound Email Actions that run for type of "New". These just have the condition similar to below and use an "Order" field that is greater than the above set of rules. We use "Stop Processing" to stop it once it's processed.

email.origemail.toLowerCase() == "facilities@my_email.com"

 

 

 

We use Office365 and we setup "Mailbox Forwarding". You'll notice in the above we are looking for who the message was sent to (our generic mailbox). It maintains who sent it and logs the call under them.

 

Hope that helps!