# Set up the Mail Server page

In the Administration perspective of the Pentaho User Console, you can also access the Mail Server page to set up the email server, as shown in the following example steps:

1. From the User Console **Home** menu, click **Administration**.

   The Users / Roles page appears.
2. Click **Mail Server**.

   The Mail Server page appears.

   ![Mail Server page in PUC](https://591371677-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFgwF7oC7Y6b7XWdahykf%2Fuploads%2Fgit-blob-0dc8336eb48cb0fe67f0f6471fcbbd1355e83527%2FPUC_MailServer_page.png?alt=media)
3. Enter your email server settings.

| Setting                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Connection Protocol**  | <p>Select the protocol used to access the email server:- <strong>SMTP</strong></p><ul><li><strong>SMTPS</strong></li><li><strong>Microsoft Graph API</strong><br>You must use <strong>Microsoft Graph API</strong> for Microsoft Exchange servers that require OAuth authentication. For other exchange servers, whether requiring OAuth authentication or not, use <strong>SMTP</strong> as usual.</li></ul>                                                                                                                                                                                                                                                                                                                             |
| **Host Name (SMTP)**     | Specify the address of your SMTP email server for sending email. Not applicable for Microsoft Graph API.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Port**                 | Specify the port number of your SMTP email server, usually 25. For Gmail, the value is 587. The default is 25. If you use TLS or SSL, then use the recommended port for your SMTP server. Not applicable for Microsoft Graph API.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Authentication Type**  | <p>Select the type of authentication required to connect to the email server:- <strong>OAuth 2.0</strong></p><ul><li><strong>Basic</strong> (for username /password-based access)</li><li><strong>No Auth</strong></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **User Name**            | Specify the username of the account used to connect to the email server for sending email. Required for all authentication mechanisms.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Password**             | Specify the password of the account used to connect to the email server. Only applicable when **Authentication Type** is **Basic**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Client ID**            | Specify the client identifier required to get the Auth Token from OAuth servers. Only applicable when **Authentication Type** is **OAuth 2.0**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Client Secret**        | Specify the client secret credential required to get the Auth Token from OAuth servers. Only applicable when **Authentication Type** is **OAuth 2.0**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Scope**                | <p>Specify the parameter required by the OAuth server to identify the permissions or scope of the Auth token being requested:- For Microsoft Graph API, when the <strong>Grant Type</strong> is <strong>Client Credentials</strong>, see <a href="https://developer.microsoft.com/en-us/graph"><https://developer.microsoft.com/en-us/graph></a>. For others, see <a href="https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&#x26;tabs=http"><https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&#x26;tabs=http></a>.</p><ul><li>For Gmail, see <a href="https://developers.google.com/gmail/api/auth/scopes"><https://developers.google.com/gmail/api/auth/scopes></a>.</li></ul> |
| **Grant Type**           | <p>Select the method that is used by the application to gain the Access Token from the OAuth servers:- <strong>Client Credentials</strong></p><ul><li><strong>Authorization Code</strong></li><li><strong>Refresh Token</strong><br>Microsoft Graph API supports all types. Gmail supports only the <strong>Authorization Code</strong> and <strong>Refresh Token</strong> types.</li></ul><p><strong>Note:</strong> If using <strong>Authorization Code</strong>, then the application gets a <strong>Refresh Token</strong> and replaces the <strong>Grant Type</strong> and token values for a one-time use code.</p>                                                                                                                  |
| **Token URL**            | Specify the URL of the OAuth Server to get access tokens.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Refresh Token**        | Specify the value obtained from the OAuth server for fetching a new access token. Only required when **Refresh Token** is the **Grant Type**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Authorization Code**   | Specify the one-time use code obtained from the Authentication URL. Only required when **Authorization Code** is the **Grant Type**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Redirect URI**         | Specify the redirect URI provided during credential setup that is used for validation while getting the access token. Only required when **Authorization Code** is the **Grant Type**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Email "From" Name**    | Specify the name that appears in the "From:" field in an email. If left blank, the default email name for this field is Pentaho Scheduler.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Email "From" Address** | Specify the address that appears in the "From:" field in an email. If left blank, the default email address for this field is Pentaho Scheduler.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Use Start TLS**        | Select if the email server requires a Start TLS connection (such as a Gmail SMTP server).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Use SSL**              | Select if the email server requires an SSL connection. Not applicable for Microsoft Graph API.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

4\. Click \*\*Test Email Configuration\*\*, then click \*\*Save\*\*.

A success message appears and your specified mail server is set up to work with the User Console.

**Note:** If your mail server is not able to connect to the Pentaho Server, verify your mail server is accessible from the environment where you installed the Pentaho Server.
