# E-Mail Integration

{% hint style="info" %}
Runtime HRMS send all employee communications from the default e-mail address i.e. **<notifications@runtimehrms.com>,** unless your configure your email settings using the process described here.
{% endhint %}

To configure your e-mail settings, go to **Setup** > **Integrations**

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FdOBUBivkfqmh43q57M6R%2Fsetup-options.png?alt=media&#x26;token=9788e7a7-a834-4c14-8518-45406eb9bba5" alt=""><figcaption><p>Setup > Integrations</p></figcaption></figure></div>

On E-Mail Integration, click on **Setup**

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FK6bQQzzaFDr9eEfyZcnj%2Fsetup-integrations.png?alt=media&#x26;token=565c0b8e-9920-4bc8-93fd-255aef978131" alt=""><figcaption><p>Email Integration</p></figcaption></figure></div>

If you have not configured mailbox earlier, you will see an empty box as shown below:

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FiNfksqlG94drCPZgo07V%2Femail-settings-empty.png?alt=media&#x26;token=30834602-0027-4c8f-9142-7db405d2c768" alt=""><figcaption></figcaption></figure></div>

Enter a display name and the official email address and click on **Create Mailbox.**

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FcyKVIDDYFs1BClLAS8iw%2Femail-settings-filled.png?alt=media&#x26;token=4fdf9876-87dd-4509-94dc-c5faaef753b6" alt=""><figcaption><p>Create Mailbox</p></figcaption></figure></div>

Once the mailbox is created, you will see the Delete Mailbox button and available integrations as shown below:

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FByLTWevBTcfXSn3uiQ7I%2Femail-settings-created.png?alt=media&#x26;token=1ee96633-d592-4b53-9430-96418a546696" alt=""><figcaption><p>Mailbox Created</p></figcaption></figure></div>

{% hint style="success" %}
One the mailbox is created, the system will include your email address in the **reply-to** field of all emails. This will ensure that if your team members reply to the system emails, the reply will come on the specified email address instead of the default unmonitored mailbox.
{% endhint %}

### Configure Sending Address (Optional)

Runtime HRMS Supports email integration with popular email providers to send email from your official email address instead of the default mailbox.

There are 3 methods to begin email integration, as described below:

#### SMTP Integration

To begin with SMTP integration, you will need following details:

1. SMTP Username (usually this is same as email address)
2. SMTP Password
3. SMTP Server
4. SMTP Port
5. SMTP requires SSL (Yes/No)

Sample settings:

| Setting      | Example            |
| ------------ | ------------------ |
| Username     | <acme@example.com> |
| Password     | acme\@123          |
| SMTP Address | smtp.example.com   |
| SMTP Port    | 587                |
| Use SSL      | Yes                |

Click on SMTP button and enter all the details as shown below:

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FbJzv4gbB4Lr0ia8QavZ7%2Femail-settings-smtp.png?alt=media&#x26;token=fea92746-16f5-43f7-ad72-7747effb370e" alt=""><figcaption><p>SMTP Settings</p></figcaption></figure></div>

Click **Save SMTP** to save the settings.&#x20;

Wait, we are not done yet! Click **Send Test Mail** to check if the given settings are correct or not. The system will try to send a test mail using the SMTP settings specified by you.

If the test mail is successful, the mailbox will become active.

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FwtQ5LcsHL8nZY7WwLBAR%2Femail-settings-active.png?alt=media&#x26;token=85a0e9a9-c58c-40fa-8486-5eb6a13b71fe" alt=""><figcaption><p>Mailbox Active</p></figcaption></figure></div>

{% hint style="success" %}
Once the email integration is active, Runtime HRMS will use the provided email credentials to send all emails to team members.
{% endhint %}

{% hint style="warning" %}
If your mailbox settings change, please follow the same steps to configure the integration again. In case Runtime HRMS detects that the settings are no longer valid and emails cannot be sent, the mailbox will automatically become inactive and emails will start flowing through the default mailbox. We'll also notify you once this happens.
{% endhint %}

#### Gmail Authentication

To configure your official Gmail account as email provider, click on **Gmail** button.

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2F4mxmlptNhTULxVVgUvVR%2Femail-integration-gmail.png?alt=media&#x26;token=8a7729bb-1ea7-40b3-9c83-8515d8a70b42" alt=""><figcaption><p>Configure Gmail Account</p></figcaption></figure></div>

{% hint style="danger" %}
**Important:** Please read Google API Services User Data Policy and Runtime Software Privacy Policy to understand how we store and use your mailbox authentication details.
{% endhint %}

Click on **Authenticate with Google**. You will be redirected to Google sign-in screen to provide your consent for sending mails.

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FNTmBcWXxTHNImn95GFFp%2Femail-google-auth-1.png?alt=media&#x26;token=4e95814f-2493-45be-948b-3ef8ce5a90ef" alt=""><figcaption><p>Google OAuth Consent Screen</p></figcaption></figure></div>

Click on your user account to continue.

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FQaO0V3S77lowLFQtQEYB%2Femail-google-auth-2.png?alt=media&#x26;token=9c9043e4-bbbb-4223-8606-6908d4aa2dff" alt=""><figcaption><p>Confirmation of permissions (Send email on your behalf)</p></figcaption></figure></div>

Click on **Continue** to grant permissions to send email on your behalf.

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FZ6mairdd5TgweeSCPb5x%2Femail-google-auth-3.png?alt=media&#x26;token=76b7bf7f-0596-4a4b-9bed-8785fc44cea1" alt=""><figcaption><p>Permissions Obtained</p></figcaption></figure></div>

Once permissions are successfully obtained, you will see the above confirmation box.

Refresh the email integration page to see updated status of Gmail integration.

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FgKUmQDk0ufqxdtvbhkoP%2Femail-google-auth-done.png?alt=media&#x26;token=514757fd-4af5-4074-981a-2669f4c9d6fb" alt=""><figcaption><p>Google OAuth status updated to Authenticated</p></figcaption></figure></div>

**Wait!**&#x20;

We still need to test these settings to activate the integration. Simply click on Send Test Mail to check the settings. Runtime HRMS will send a test email using your google account. Once the test mailing process is successful, the mailbox will become active.

#### Microsoft Authentication

To configure your Microsoft email account (Hotmail, Outlook, Live etc.) as email provider, click on **Microsoft** button.

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2F048FSFQTX0OuclFQvBaA%2Femail-microsoft.png?alt=media&#x26;token=7e928cd8-7a2f-49c1-bdd9-ef1250e47807" alt=""><figcaption><p>Configure Microsoft Account</p></figcaption></figure></div>

Click on **Microsoft Authentication**. You will be redirected to Microsoft sign-in screen to provide your consent to send emails using your account.

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FSQDKr0SoeFUe5SxMI8wz%2Femail-microsoft-auth.png?alt=media&#x26;token=e07d12e5-92a3-4da8-8b67-5c7ff0d7a6a1" alt=""><figcaption></figcaption></figure></div>

Review the requested permissions and click on **Accept**

<div align="left"><figure><img src="https://4109542518-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr1ZpbXBjFLtyv9GwUyPB%2Fuploads%2FKD3n84ds8DJsXyAegviL%2Femail-microsoft-done.png?alt=media&#x26;token=03b655ec-5e3f-437d-9ade-49ab233f2fb4" alt=""><figcaption><p>Microsoft OAuth status updated to Authenticated</p></figcaption></figure></div>

Once the permissions are obtained, the status will change to Authenticated.

{% hint style="info" %}
**Wait**

We still need to test these settings to activate the integration. Simply click on **Send Test Mail** to check the settings. Runtime HRMS will send a test email using your google account. Once the test mailing process is successful, the mailbox will become active.
{% endhint %}

#### Important Information regarding OAuth 2.0

OAuth 2.0 is a industry standard method to grant permissions to your Gmail & Microsoft accounts. Runtime HRMS is a registered and approved provider with both Google and Microsoft to obtain these permissions.

After your provide your permission, Runtime HRMS DOES NOT get access to your account password. We only store an access token which is used to authenticate your account with Google/Microsoft to send mails.&#x20;
