# How to add Email Accounts to macOS devices?

This article will help you add email accounts to macOS devices via UEM.

There are times when an administrator needs to set up an email account on Mac remotely. Some cases may involve hundreds of macOS devices that are to be configured with the corporate email accounts. Attending to all these devices manually can be a herculean task for many administrators. After all, the whole process is tiring, frustrating, and unnecessary.

Organizations find it highly beneficial if they can add email accounts to macOS devices remotely to get their users ready for action. With the powerful device management solution Hexnode UEM, one can seamlessly configure email accounts to enable users to send and receive emails with their corporate email accounts.

With Hexnode, the admins can configure POP or IMAP mail accounts on Macs, set up incoming and outgoing mail server settings, select different user authentication types, and much more. The admin can make use of the [wildcard](https://www.hexnode.com/mobile-device-management/help/how-to-pass-device-and-user-information-using-the-wildcards-supported-by-hexnode-mdm/) functionality to auto-populate various data such as usernames or email addresses based on the details provided while enrolling devices in Hexnode UEM.

Add mail accounts to macOS devices via UEM
------------------------------------------

To set up email accounts via policy,

1. Log in to your **Hexnode UEM** portal.
2. Navigate to **Policies > New Policy**. Assign a suitable name and description (optional) for the policy. You can also choose to continue with an existing policy.
3. Go to **macOS > Accounts > Email**. Click Configure.

SettingsDescriptionAccount DescriptionEnter a proper display name for the email account, as this name is used to differentiate between multiple email accounts.Account TypeDefine the protocol to be used for the email account. The available protocols are: - **POP** (default): POP downloads all emails (sent, received, and drafts) from the server and stores them locally on the device. Once the emails are stored on your devices, they are usually deleted from the email server.
- **IMAP**: IMAP stores emails on the email server and syncs the emails across multiple devices.

User Display NameEnter the full user name for the account. This name is shown in the sent messages. Use the wildcard **%name%** to auto-populate the user’s name mapped to the device in Hexnode UEM.Email AddressEnter the email address for the account. Use the wildcard **%email%** to fetch the email addresses of users mapped to the device in Hexnode UEM.### Set Up Incoming Emails

SettingsDescriptionIncoming Mail ServerEnter the IP address or fully qualified domain name (FQDN) of the incoming mail server.Incoming Server PortProvide the port number of the incoming email server.User NameEnter the username used to connect to the incoming email server. Use the wildcard *%username%* to fetch the data dynamically from the UEM console.Authentication TypeSelect the authentication type of the incoming mail. The available values are: - *None*
- *Password* (default)
- *MD5 Challenge-Response*
- *NTLM*
- *HTTP MD5 Digest*

PasswordIf ‘Authentication Type’ is set to any option other than ‘None,’ you must provide a password for authenticating to the incoming email server.
 Note: If multi-factor authentication is enabled for the email account and isn’t supported by the native email app, add the app password instead of the account password.

 

 Use SSLUse SSL to establish an encrypted connection between the incoming mail server and the Mac devices. SSL is enabled by default.### Set up Outgoing Emails

SettingsDescriptionOutgoing Mail ServerSpecify the IP address or fully qualified domain name (FQDN) of the outgoing mail server.Outgoing Server PortEnter the port number of the outgoing email server.User NameProvide the username used to connect to the outgoing email server. Use the wildcard *%username%* for Hexnode UEM to automatically fetch data from the user information.Authentication TypeSelect the type of authentication required for the outgoing mail server. You can choose from: - *None*
- *Password*
- *MD5 Challenge-Response*
- *NTLM*
- *HTTP MD5 Digest*

Outgoing Password Same As Incoming (If ‘Authentication Type’ is set to any option other than ‘None’)

Specify whether the passwords for the incoming and outgoing emails are the same. If this option is checked, the outgoing ‘Password’ field will be hidden. This option is checked by default.Password (Available if ‘Outgoing Password Same As Incoming’ is unchecked)

Enter the password for the outgoing mail server.Use SSLUse SSL to establish an encrypted connection between the outgoing mail server and the devices. SSL is enabled by default.[![Add email account to macOS devices using Hexnode UEM](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2024/01/Configuring-Email-account-for-macOS-devices.png "Configuring Email account for macOS devices")](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2024/01/Configuring-Email-account-for-macOS-devices.png)

Associate policy with target Mac
--------------------------------

If the policy has not been saved,

1. Navigate to **Policy Targets > +Add Devices**.
2. Choose the target devices and click **Ok**. Click **Save**.
3. You can also associate the policy with **Device Groups**, **Users**, **User Groups**, or **Domains** from the left pane of the **Policy Targets** tab.

If the policy has been saved,

1. Go to the *Policies* tab and choose the desired policy.
2. Click on the **Manage** drop-down and select **Associate Targets**.
3. Choose the target entities and click **Associate**.

What happens at the device end? 
--------------------------------

When the policy is deployed, the email account will get added on the **Mail** app. The account settings can be found under **System Preferences > Internet Accounts**.