# EmailRead

| aliasName            | Email configuration is done in deployment. Aliasname that you want to use for this configuration                                                                                                                                      | Must be a defined alias name from deployment                                                                                                                                           |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| mailServer           | Type of Mail server that you are connecting to. For popular mail server we have predefined props that will ease off configuration                                                                                                     | Options: office365,gmail                                                                                                                                                               |
| protocol             | Mail Access Protocol                                                                                                                                                                                                                  | Options:imaps,smtp,pop3s,pop3                                                                                                                                                          |
| host                 | Host name to connect to the mail server                                                                                                                                                                                               | <p>Examples:<br>outlook.office365.com<br></p>                                                                                                                                          |
| port                 | Port no to listen on                                                                                                                                                                                                                  |                                                                                                                                                                                        |
| domain               | Domain Name to access mail box                                                                                                                                                                                                        | Optional. Mostly required if you mail server is linked to your active directory                                                                                                        |
| username             | Username to access mailbox                                                                                                                                                                                                            |                                                                                                                                                                                        |
| password             | Password to access mailbox                                                                                                                                                                                                            |                                                                                                                                                                                        |
| sharedMailbox        | Mailbox address of shared mailbox that you want to access                                                                                                                                                                             | Optional                                                                                                                                                                               |
| folder               | folder in the mail box from which you want to fetch email                                                                                                                                                                             | <p>Optional: Default: Inbox</p><p>Example: Inbox/orders</p>                                                                                                                            |
| matchCriteria        | <p>Matching text in subject or body. </p><p>Expression format: \[fieldName]:\[operation]:\[value] </p><p>Supported operators: contains , equals Logical Operators: AND / OR (Make sure to give before and after Logical operators</p> | <p>Simple Eg: body:contains:Ram</p><p>With Dynamic Value  Eg: subject:contains:${FirstName}</p><p>With Complex Logical Operation Eg: body:contains:Ram AND subject:equals:Inviated</p> |
| matchOptions         | Option to return single item or all                                                                                                                                                                                                   | <p>Default: firstOnly</p><p>Options:firstOnly,all</p>                                                                                                                                  |
| extract.field        | Message Data field from which information to be extracted                                                                                                                                                                             | Message Fields: subject,body,receivedDataTime,fromEmail,fromName,toEmails,toNames,ccEmail,ccNames,bccEmails,bccNames                                                                   |
| extraction.operation | Extraction rules to be applied on the message field                                                                                                                                                                                   | Refer to [Extraction rules](/extraction-rules.md)                                                                                                                                      |
|                      |                                                                                                                                                                                                                                       |                                                                                                                                                                                        |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.qatts.com/automation/objects/smarty/emailread.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
