# Mail Automator

Infraon automatically converts emails into tickets and sends them to end-users using IMAP configuration. It saves tremendous time to send tickets from the mail manually.

## **How does it work?**

IMAP (Internet Message Access Protocol) is a standard email retrieval (incoming) protocol. It saves email messages on a mail server and allows recipients to see and edit them as if they were locally saved on their device(s).

You can configure your email servers on Infraon using the IMAP Configuration module, which allows us to read emails and turn them into incidents.

### **What you see on the screen**

Administrators or privileged users can configure (add), edit, and delete IMAP configurations. Refer to the 'Email Integrations' section for instructions to forward from your existing email accounts.

## **Instructions to 'Configure IMAP'**

* Navigate to Infraon Configuration → Infraon Automation → Mail Automator.
* Click the "New Config" button to begin IMAP setup.

{% hint style="info" %}
Currently, only IMAP configurations are supported. Ensure the email ID allows access from less secure apps if needed.
{% endhint %}

The configuration page offers two options: Using “Microsoft” OAuth sign-in or manual input under "Other." The setup includes two tabs: Email Config and Domains.

![](https://content.gitbook.com/content/E4mkwSP8a1BSD9BFNFav/blobs/O4eKHj7mYNNvW5taqyJE/Unknown%20image)

**Email Config |** Add IMAP

<table><thead><tr><th width="157">Label</th><th>Action / Field</th><th>Description / Example</th></tr></thead><tbody><tr><td><strong>Email Provider</strong></td><td>Choose the provider’s option.</td><td><p>Select the type of mail provider:</p><ul><li>Sign in with Microsoft → Uses OAuth 2.0 authentication for Office365/Outlook.</li><li>Other → For Gmail, custom IMAP servers, or any non-OAuth provider where credentials must be entered manually.</li></ul></td></tr><tr><td><strong>Module Type*</strong></td><td>Choose module</td><td><p>Select the application module where incoming emails should be converted:</p><ul><li><strong>Ticket →</strong> Emails are logged as incidents/tickets.</li><li><strong>Request →</strong> Emails are logged as service requests.</li></ul></td></tr><tr><td><strong>Mail Server*</strong></td><td>Enter IMAP mail server URL</td><td>This is the incoming mail server (IMAP) used to fetch messages.<br><strong>Example:</strong> support.infraon.io.</td></tr></tbody></table>

**Authentication Type**| IMAP Config

When selecting the Authentication Type, three options are available:

* Basic Authentication
* OAuth2 Microsoft
* Microsoft Exchange Server

Based on your selection, the required fields will appear dynamically.

**Basic Authentication**

With Basic Authentication, you configure the mailbox using a username (email address) and password. This method is straightforward but less secure compared to OAuth. It’s best suited for mail servers that do not support modern authentication standards.

![](https://content.gitbook.com/content/E4mkwSP8a1BSD9BFNFav/blobs/gvtXDD5EaZl2iMZLx8HX/Unknown%20image)

Optionally, you can enable the Add Username field if the mail server requires a login ID different from the email address.

Basic Authentication **| Email Config**

| Label            | Action         | Description / Example                                                                          |
| ---------------- | -------------- | ---------------------------------------------------------------------------------------------- |
| **Email\***      | Enter email ID | **Example:** <helpdesk@infraon.io>                                                             |
| **Add Username** | Toggle button  | An optional field if the server requires a different login name.**Example:** infraon\_support. |
| **Password\***   | Enter password | Securely input the account password.                                                           |

**OAuth2 Microsoft**

When selecting OAuth2 Microsoft, you configure secure, token-based authentication for Microsoft accounts (Office 365 / Outlook). Instead of storing user passwords, OAuth uses client credentials to request and refresh tokens, making it more secure and compliant with modern standards.

![](https://content.gitbook.com/content/E4mkwSP8a1BSD9BFNFav/blobs/zb6CWN9RMTxif3gedxoz/Unknown%20image)

You’ll need to provide values such as Client ID, Client Secret, and Tenant ID, which can be obtained from the Azure Active Directory App Registration.

OAuth2 Microsoft **| Email Config**

| Label               | Action              | Description / Example                                                                                 |
| ------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
| **Email\***         | Enter email ID      | **Example:** <support@infraon.io>.                                                                    |
| **Password\***      | Enter password      | If required for specific hybrid setups (optional in pure OAuth).                                      |
| **Client ID\***     | Enter Client ID     | **Example:** f72d1abc-1234-4f56-b78a-\*\*\*\*\*\*                                                     |
| **Client Secret\*** | Enter secret key    | **Example:** Generated in Azure AD app registration.                                                  |
| **Tenant ID\***     | Enter Tenant ID     | **Example:** 72f988bf-\*\*\*\*\*\*-91ab-2d7cd011db47.                                                 |
| **Authority\***     | Enter authority URL | <p><strong>Example:</strong><br><br><https://login.microsoftonline.com/><strong>2d7cd01</strong>.</p> |

**Microsoft Exchange Server**

For Microsoft Exchange Server authentication, the configuration is tailored to on-premises Exchange environments or dedicated Exchange setups. This method requires the mailbox email address and password, which are typically validated against Active Directory credentials.

![](https://content.gitbook.com/content/E4mkwSP8a1BSD9BFNFav/blobs/yMEA1hR3sA3ayt2m2R06/Unknown%20image)

It’s suitable for organizations that manage their own Exchange infrastructure instead of using Office 365.

Microsoft Exchange Server **| Email Config**

| Label          | Action         | Description / Example                       |
| -------------- | -------------- | ------------------------------------------- |
| **Email\***    | Enter email ID | **Example:** <itadmin@company.com>.         |
| **Password\*** | Enter password | Active Directory/Exchange account password. |

**Server Port Configuration |** Email Config

| Label                 | Action                         | Description / Example                                                                                    |
| --------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------- |
| **Incoming (IMAP)\*** | Add the server port            | Defines the port used to receive incoming emails via the IMAP protocol.**Example:** 993 (with SSL/TLS).  |
| **Encryption Type\*** | Select the appropriate option. | Ensures secure communication between the mail server and the application.**Options:** SSL or TLS.        |
| **SMTP Server\***     | Click to add information.      | Specifies the outgoing mail server used to send emails from the application.**Example:** smtp.gmail.com. |
| **Outgoing (SMTP)\*** | Add the server port            | Defines the port used for outgoing emails via SMTP.**Example:** 587 (commonly used with TLS).            |
| **Encryption Type\*** | Select the appropriate option  | Secures outgoing mail communication with encryption.**Options:** SSL or TLS.                             |

{% hint style="info" %}
Click 'Use Default' to automatically populate the recommended port numbers and encryption settings based on your chosen provider.
{% endhint %}

![](https://content.gitbook.com/content/E4mkwSP8a1BSD9BFNFav/blobs/wOxGkFJ58AbAvPaUexVL/Unknown%20image)

After entering the details, click **Test** to verify the connection, authentication, and mailbox accessibility. Any errors will be displayed if the login fails or the server cannot be reached.

{% hint style="info" %}
Fields marked with an asterisk **(\*)** are mandatory to fill.
{% endhint %}

Click **Next** to proceed to the **Domains Tab**, where you can configure domain-level rules and filter after successful IMAP validation.

**Domains Tab |** IMAP Configuration

![](https://content.gitbook.com/content/E4mkwSP8a1BSD9BFNFav/blobs/amLqf5I5GQW2DEEycYQf/Unknown%20image)

<table><thead><tr><th width="193">Label</th><th width="198.5999755859375">Action / Field</th><th>Description / Example</th></tr></thead><tbody><tr><td><strong>Select Impact Services</strong></td><td>Optional drop-down selection</td><td><p>Allows linking email processing to specific IT services for impact correlation.<br></p><p><strong>Example:</strong> Select Corporate Network to tag requests impacting that service.</p></td></tr><tr><td><strong>Impact Service</strong></td><td>Choose a related impact service.</td><td>Pick the exact service affected. Useful for service-specific routing and automation.<br><br><strong>Example:</strong> Database Services, Email System.</td></tr><tr><td><strong>Use Email Subject in Service Classification</strong></td><td>Enable/Disable toggle.</td><td><p>When enabled, the system scans email subjects to automatically classify the request into a service.<br></p><p><strong>Example:</strong> Subject "Payroll Access Issue" → HR Service.</p></td></tr><tr><td><strong>Allow Duplicates</strong></td><td>Enable/Disable toggle.</td><td>If enabled, duplicate emails create separate requests/tickets. Useful when repeat notifications must be logged independently.</td></tr><tr><td><strong>If Email in To Address</strong></td><td>Enable/Disable toggle.</td><td><p>Controls ticket creation based on the email recipient field.<br><br><strong>If enabled:</strong> Ticket is created only when the configured IMAP email address is present in the <strong>To</strong> field of the incoming email. Emails where the configured address appears only in CC or BCC are ignored, and no ticket is created.<br><br><strong>Example (Enabled):</strong> IMAP email configured as <a href="mailto:support@example.com">support@example.com</a><br></p><ul><li>To: <a href="mailto:support@example.com">support@example.com</a> → Ticket is created</li><li>CC: <a href="mailto:support@example.com">support@example.com</a> → Ticket is not created</li><li>BCC: <a href="mailto:support@example.com">support@example.com</a> → Ticket is not created</li></ul><p><strong>If disabled:</strong> A ticket is created whenever the configured IMAP email address appears in the To, CC, or BCC fields of the email.<br><br><strong>Example (Disabled):</strong><br></p><ul><li>To: <a href="mailto:manager@example.com">manager@example.com</a></li><li>CC: <a href="mailto:support@example.com">support@example.com</a> → Ticket is created</li></ul></td></tr><tr><td><strong>Full Subject Match</strong></td><td>Enable/Disable toggle.</td><td>Only processes/classifies emails whose subject exactly matches defined keywords.<br>Partial matches will be ignored.</td></tr><tr><td><strong>Allow Process Classification</strong></td><td>Enable/Disable toggle</td><td><p>Automates the classification of incoming emails into processes/workflows.<br></p><p><strong>Example:</strong> Routing HR-related mails to Employee Request Workflow.</p></td></tr><tr><td><strong>Blocked Email</strong></td><td>Enter addresses to block</td><td><p>Define blacklisted senders to prevent spam.<br></p><p><strong>Example:</strong> spam@example.com, ads@marketing.io.</p></td></tr><tr><td><strong>Department</strong></td><td>Select organizational department</td><td><p>Routes the request/ticket created to a specific department.<br></p><p><strong>Example:</strong> IT Helpdesk, Finance, HR.</p></td></tr><tr><td><strong>Approve all Domains</strong></td><td>Enable list of domains for approval</td><td><p>Only emails from approved domains are processed.<br></p><p><strong>Example:</strong> Approve infraon.io → blocks all external/unapproved domains.</p></td></tr></tbody></table>

After completing the setup, click **Submit** to finalize and save the IMAP and domain configurations. This activates email-to-request/ticket automation for the selected module.
