An inbound email action script contains the email object to access various pieces of an inbound email through variables. You can use the global variable sys_email with inbound email actions.

Note: The instance follows RFC 2822 (Internet Message Format), which requires multiple email addresses in a group to be separated by commas, not semicolons. The instance can set the values of the email.to, email.direct, and email.copied variables only if emails addressed to groups follow the expected RFC format.

Inbound email.recipient variables

The recipients variables (email.recipients, email.recipients-array) allow processing of inbound email based on the email recipients. For example, you can create a script to process email based on the array values:
var rarray  = email.recipients_array ; for ( var i  = 0 ; i  < rarray.length ; i ++ ) { var recipient  = rarray [i ] ; // do something with it } 

The sys_email variable

This variable lets you access the received sys_email record that triggered the inbound email action. It can be used to reference fields on the email record, such as uid, sys_id, content_type, and so on.