---
sourceDocument: Brazil ServiceNow AI Platform Administration
sourceDocumentLink: https://www.servicenow.com/docs/r/platform-administration

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Accessing email object variables

# Accessing email object variables {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Accessing email object variables

This information explains how to use theemailobject variables within inbound email action scripts in ServiceNow to access and manipulate different components of an inbound email.
The global variablesysemailis also available to work with the received email record that triggers the inbound email action.
Show full answer Show less  

## Key Features

* **email.to** , **email.direct** , and **email.copied**: Retrieve comma-separated lists of email addresses from the To and Cc fields, enabling scripts to identify recipients.
* **email.bodytext** and **email.bodyhtml**: Access the email content in plain text or HTML format for processing or parsing.
* **email.from** and **email.fromsysid**: Identify the sender's email address or their user Sys ID if matched within the instance, which is useful for user verification or automated responses.
* **email.origemail** and **email.fromAddress** : Provide sender information as listed in email headers, with **email.fromAddress** relying on a system property to extract from headers.
* **email.subject**: Access the email subject line as plain text.
* **email.recipients** and **email.recipientsarray**: Offer the recipients as a string or an array, allowing scripts to iterate over recipients and apply logic based on individual addresses.
* **email.contenttype** and **email.headers**: Provide MIME type and raw header information, useful for complex email handling.
* **email.importance**: Reflects the sender's priority indication (High, Low, or empty), enabling prioritization in processing.
* **sysemail**: Provides access to the underlying email record triggering the action, including fields like uid, sysid, and contenttype.

## Practical Application for ServiceNow Customers

By leveraging these variables in inbound email action scripts, customers can create tailored automation and processing workflows based on the sender, recipients, content, and metadata of incoming emails. This enables advanced email-driven interactions such as routing, notifications, or incident creation based on detailed email attributes.

Additionally, understanding the RFC 2822 format requirement for email addresses ensures that group addresses are correctly parsed, which is important for reliable email recipient handling.

Using **email.recipientsarray** allows for efficient iteration over recipients to apply customized logic per recipient, enhancing flexibility in email processing scenarios.  
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 <var class="keyword varname">sys_email</var>
with inbound email actions.
{#r_AccessingEmailObjsWithVars__table_sbj_31q_n4__entry__2}

| Variable | Contents |
|-|-|
| <var class="keyword varname">email.to</var> | Contains a comma-separated list of email addresses in the To: and Cc: boxes. |
| <var class="keyword varname">email.direct</var> | Contains a comma-separated list of email addresses in the To: box. |
| <var class="keyword varname">email.copied</var> | Contains a comma-separated list of email addresses in the Cc: box. |
| <var class="keyword varname">email.body_text</var> | Contains the body of the email as a plain text string. |
| <var class="keyword varname">email.body_html</var> | Contains the body of the email as an HTML string. |
| <var class="keyword varname">email.from</var> | Contains an email address that depends on the following conditions: * If the address listed in the email Headers field matches an existing user's Email address, this variable contains the user's email address. * If the address listed in the email Headers field does not match an existing user's Email address, this variable contains the address listed in the email Headers field. {#r_AccessingEmailObjsWithVars__ul_erp_ywk_br} |
| <var class="keyword varname">email.from_sys_id</var> | Contains the Sys ID of the user who sent the email to the instance. |
| <var class="keyword varname">email.fromAddress</var> | If system property glide.email.inbound_action.extract_from_header property is set to true, origemail is computed from the headers. The default value is false if the property does not exist. |
| <var class="keyword varname">email.origemail</var> | Contains the address of the email sender as listed in the email Headers field. |
| <var class="keyword varname">email.subject</var> | Contains the subject of the email as a plain text string. |
| <var class="keyword varname">email.recipients</var> | Contains a comma-separated list of recipient addresses as a plain text string, in the To: box. |
| <var class="keyword varname">email.recipients_array</var> | Contains the recipient addresses as an array. |
| <var class="keyword varname">email.content_type</var> | Contains the MIME content type of the email (for example,<var class="keyword varname">text/plain; charset="us-ascii"</var> or <var class="keyword varname">text/html; charset="us-ascii"</var>). |
| <var class="keyword varname">email.headers</var> | Contains details about the sender, route, and receiver as a plain text string in the format of the sending email client. |
| <var class="keyword varname">email.importance</var> | Contains an indication from the sender about how important a message is. The value can be High, Low, or empty. |
[Table 1. Accessing email objects with variables]

{#r_AccessingEmailObjsWithVars__table_sbj_31q_n4}  
Note:  
The instance follows [RFC 2822](http://www.rfc-editor.org/info/rfc2822) (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 <var class="keyword varname">email.to</var>, <var class="keyword varname">email.direct</var>, and <var class="keyword varname">email.copied</var> variables only if emails addressed to groups follow the expected RFC format.

## Inbound email.recipient variables {#r_AccessingEmailObjsWithVars__section_m3y_2c3_2db}

The recipients variables (<var class="keyword varname">email.recipients</var>, <var class="keyword varname">email.recipients-array</var>) 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 {#r_AccessingEmailObjsWithVars__section_xxr_3f3_2db}

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.

