Chapter 20. Email Configuration

The introduction of server-side synchronization with Microsoft Dynamics CRM 2013 meant that organizations could leverage the power of Dynamics CRM for email tracking without requiring Outlook or the email router to synchronize emails. Microsoft Dynamics CRM 2016 improves and enhances the server-side synchronization even further, and the system is now more stable and usable than ever before.

This chapter explains when and how to use server-side synchronization and the email router and the limitations of both scenarios.


Note

During server installation, email is not configured by default. Users can set up their preferred settings afterward.


Microsoft Dynamics CRM provides the following email processing options:

Image Server-side synchronization integrates Microsoft Dynamics CRM with Exchange (or POP3/SMTP services).

Image Microsoft Dynamics CRM for Microsoft Office Outlook and Microsoft Dynamics CRM for Outlook with Offline Access are both options for users.

Image The email router manages both incoming and outgoing messages.

Image The email router supports POP3 email systems for incoming messages and SMTP email systems for outgoing messages.

Image Microsoft Dynamics CRM email messages are sent asynchronously via the email router.

In addition to this chapter explaining server-side synchronization, this chapter covers the email configuration options required for proper usage by explaining all the available components and their options.

Server-Side Synchronization

Earlier versions of Microsoft Dynamics CRM required Outlook to manage and track emails to and from Outlook and also required installation and configuration of the email router. Server-side synchronization eliminates both of these needs.

Microsoft Dynamics CRM integrates with Outlook using the Microsoft Dynamics CRM for Outlook client (the Outlook plug-in), but earlier versions of Microsoft Dynamics CRM usually required both an installed and configured email router (typically on a separate machine) and Outlook to be running (for it to send and receive emails). Use of server-side synchronization eliminates the need for the email router. In addition, server-side synchronization now provides a level of integration with Exchange directly to allow for this functionality. An example of this is as follows:

1. A user creates a new email and selects the Track in CRM option.

2. The user clicks Send on the email, and it is sent it to Exchange for routing (sending).

3. Exchange communicates with Microsoft Dynamics CRM, which creates a corresponding record in CRM, which in turn updates Exchange.


Note

The Outlook client is still necessary to promote (i.e. track in CRM) emails from Outlook to CRM.


Dynamics CRM 2016 now supports new scenarios for server-side synchronization:

Image Microsoft Dynamics CRM On-Premises using either Exchange Online or Exchange Server 2010/2013 or 2016

Image Gmail, MSN, Outlook.com, Windows Live Mail, or Yahoo! Mail using POP3/SMTP


Note

Only Exchange supports both email and appointment, contacts, and tasks synchronization. A POP3/SMTP email server provides email synchronization, but it does not synchronize appointments, contacts, and tasks.


The following scenarios are now supported for server-side synchronization:

Image Microsoft Dynamics CRM Online with Exchange On-Premises 2010/2013 or 2016

Image Microsoft Dynamics CRM On-Premises with Exchange Online

Any version of Exchange prior to 2010 is not supported for server-side synchronization.

In addition, the server-side synchronization requires a mailbox record for every user and queue in the organization that wants to leverage server-side synchronization, and this can create some administrative overhead.


Tip

If your organization has many mailboxes, it might make sense to use the Forward mailbox, which creates a single mailbox that forwards the email to the user’s mailbox.


Configuring Server-Side Synchronization

To configure server-side synchronization, follow these steps:

1. Navigate to Settings > Email Configuration. Select Email Server Profiles to create a profile (see Figure 20.1).

Image

FIGURE 20.1 Email configuration settings.

2. Click +New to create a new profile and select Exchange (see Figure 20.2). (You might need to choose POP3-SMTP Profile, depending on your email server.) Data encryption must be active. If it’s not, you see the warning shown in Figure 20.3.

Image

FIGURE 20.2 Selecting a new configuration.

Image

FIGURE 20.3 Data encryption requirement error.

3. To activate data encryption, navigate to Settings > Data Management and select the Data Encryption option (see Figure 20.4).

Image

FIGURE 20.4 Disabled data encryption.


Note

HTTPS must be enabled to use the Data Encryption option.


4. Click Activate to enable data encryption (see Figure 20.5). The new email server profile page opens (see Figure 20.6), allowing you to enter the information for the Exchange server.

Image

FIGURE 20.5 Activated data encryption.

Image

FIGURE 20.6 Email server profile configuration.

If you are accessing Dynamics CRM without Secure Sockets Layer (SSL), you get the error message shown in Figure 20.7, which prevents you from setting the username and password for the profile. To enable the username and password, you must adjust the AllowCredentialsEntryViaNonSecureChannels value in the configuration database. Alternatively, you can change the authentication to use Integrated Windows Authentication.

Image

FIGURE 20.7 Email server profile error.

5. Enter a value in the Name field and click Save. The ribbon menu now gives you a Test & Enable Mailboxes option (see Figure 20.8), and it sets the profile as the default.

Image

FIGURE 20.8 Enabled profile.

At this point, you can also specify the credentials used by Exchange server (for On-Premises deployments) by choosing one of the following from the Authenticate Using drop-down:

Image Credentials Specified by a User or Queue—Use this option when you want to use credentials specified in the mailbox record of the user or queue.

Image Credentials Specified in Email Server Profile—Use this option when you want to use a single credential for all the mailboxes. The credential must have impersonation rights on Exchange.

Image Integrated Windows Authentication—This option leverages the same credentials that the CRM asynchronous service is configured with. (It is only applicable to Exchange and SMTP servers.)

Image Without Credentials (Anonymous)—This is not a valid selection when working with Exchange.

In this case, select Credentials Specified by a User or Queue. Because you’re only going to set up one profile, you need to set this profile as the default profile by clicking Set as Default from the ribbon menu.

6. To set up your mailboxes, close this window and navigate to Mailboxes > Active Mailboxes. By default, you see a mailbox for all created users in the CRM system (see Figure 20.9).

Image

FIGURE 20.9 Active mailboxes.

7. Select the mailbox you want to update and open it. By default, the Incoming Email, Outgoing Email, and Appointments, Contacts, and Tasks fields are set to Microsoft Dynamics CRM for Outlook (see Figure 20.10).

Image

FIGURE 20.10 Mailbox configuration.

8. Change the settings for the Incoming Email, Outgoing Email, and Appointments, Contacts, and Tasks fields to Server-Side Synchronization or Email Router, as shown in Figure 20.11. Notice also that the Server Profile value is the newly created server profile that you created in step 4. Click Save. Because you selected Server-Side Synchronization, you are prompted to specify credentials. (If you select CRM for Outlook or Integrated Windows Authentication, no credentials are necessary.)

Image

FIGURE 20.11 Mailbox configuration set for server-side synchronization.

9. Enter the credentials, as shown in Figure 20.12 and click Save. Notice that the alert still indicates that the mailbox is disabled for incoming email processing. This is because the mailbox has not been tested/enabled.

Image

FIGURE 20.12 Entering credentials.

10. Click Test & Enable Mailbox in the ribbon menu. The dialog shown in Figure 20.13 appears.

Image

FIGURE 20.13 Testing and enabling the mailbox.

11. In the Test Email Configuration dialog, confirm the dialog by clicking OK. If the test is successful, you receive an email showing the test message (see Figure 20.14).

Image

FIGURE 20.14 Test message.


Tip

You may also need to approve the email address by clicking the Approve Email button to verify the test (see Figure 20.12).


If you review the record in Dynamics CRM, you see that the results show Success for the test (see Figure 20.15). The server-side synchronization is now set up and configured to work. You can perform the same configurations on a Forward mailbox.

Image

FIGURE 20.15 Successful test results.

If you have failures during the setup and configuration, you can navigate to the Alerts section (see Figure 20.16) and review and correct any specific problems shown.

Image

FIGURE 20.16 Alerts section showing errors.

Dynamics CRM 2016 has a new dashboard called the Server-Side Synchronization Performance Dashboard (see Figure 20.17), which you can find by going to Sales > Dashboards.

Image

FIGURE 20.17 Server-Side Synchronization Performance Dashboard.

This dashboard shows useful information about the status of the server-side synchronization health.


Note

For more information about how to troubleshoot and understand this dashboard, go to https://technet.microsoft.com/library/dn850386.aspx.


Migrating Email Router Data

With the new server-side synchronization configuration, there is no need for an email router. If you upgraded Dynamics CRM from a previous version that was using the email router, you can use the migration tool described next to migrate the data and eliminate the email router.

To perform the migration, follow these steps:

1. From Settings > Email Configuration, select Migrate Email Router Data (see Figure 20.18).

Image

FIGURE 20.18 Email configuration.

2. The Email Router Data Migration tool opens and prompts you for three files that are required for the migration process (see Figure 20.19):

Image EncryptionKey.xml

Image Microsoft.Crm.Tools.EmailAgent.SystemState.xml

Image Microsoft.Crm.Tools.EmailAgent.xml

Image On the server with the email router installed, you can usually find these files in C:Program FilesMicrosoft CRM EmailService (as shown in Figure 20.20).

Image

FIGURE 20.19 Email Router Data Migration tool.

Image

FIGURE 20.20 Required email router files.


Tip

The maximum size for all the files cannot exceed 32MB.


3. After uploading the files, click Next.

4. Confirm the details displayed on the Select Email Server Profile to Migrate pane and click Next and Start to complete the migration.

Microsoft Dynamics CRM for Outlook

You can use Microsoft Dynamics CRM for Outlook to perform the following tasks:

Image Deliver received email messages to Microsoft Dynamics CRM

Image Send email messages generated from Microsoft Dynamics CRM

As explained earlier in this chapter, server-side synchronization eliminates the need for the CRM Outlook client and the email router. The rest of this chapter is devoted to users who don’t meet the minimum requirements for server-side synchronization or who want to deploy Microsoft Dynamics CRM without server-side synchronization.


Caution

Microsoft Dynamics CRM for Outlook does not require the email router to process Microsoft Dynamics CRM email messages. However, when it is not used, and when server-side synchronization is not set up, the only time CRM can process emails into the CRM system is when Outlook and the Dynamics CRM client are running. Therefore, situations can arise in which important emails might be sent and received by the organization but are not acted upon by CRM because the individual’s Outlook is not running and has not processed the email yet.


Image For more information about using and configuring the Outlook client, refer to CHAPTER 19, “Outlook Configuration.”

Email Router

The CRM email router is a piece of software that receives messages from a service and forwards the messages to another service. For example, the messages are received from the CRM server, and they are forwarded to Microsoft Exchange or to the configured email server or vice versa.

The email router performs the following tasks:

Image Routes incoming email messages to Microsoft Dynamics CRM

Image Sends email messages generated from Microsoft Dynamics CRM

The CRM email router comes as a separate installation and must be installed after the CRM server installation. You can install the CRM email router on a separate server; it doesn’t need to be the same machine where you have Microsoft Exchange Server installed or the same machine where you have the CRM server installed. You can even install it on a separate server or computer running Windows 7, Windows 8, Windows 8.1, Windows 10, or Windows Vista Business or Enterprise, because those are the versions that can be joined to a domain.

The computer on which you install the email router must have a connection to the Exchange server, to a POP3/SMTP email server, or to the Internet if you are connecting to Exchange Online. Also, the server is not required to be a member of the same domain as the CRM server.


Note

You might also be required to install the Microsoft Exchange Server MAPI client and Collaboration Data Object component before installing the CRM email router. The component can be downloaded from www.microsoft.com/en-us/download/details.aspx?id=1004. For more information on how to install this component, navigate to http://support.microsoft.com/kb/951401.


The email router contains the following components:

Image Email router service and program files

Image Email Router Configuration Manager

Image Rule Deployment Wizard (This wizard lets you deploy rules that are used to route email messages to a Forward mailbox.)


Caution

The Rule Deployment Wizard does not work with POP3/SMTP email servers.


Configuring the Email Services

By default, users must use the Microsoft Outlook client to be able to send and track incoming emails in Microsoft Dynamics CRM via the Send button, as shown in Figure 20.21.

Image

FIGURE 20.21 Sending direct email to a contact from Microsoft Dynamics CRM.


Caution

If you do not install the Outlook client and you send a direct email to a contact using the CRM web interface, the email will not be sent unless you configure server-side synchronization or without using a CRM router. In this case, the email is still created with a Pending Send status. If you configure the email router after this time or if you configure server-side synchronization, all the emails will be sent that have this status so be sure to run an Advanced Find to make sure you don’t have any unwanted emails pending, as they will all go out upon successful completion of the email router configuration.


However, after you compose the email and click the Send button, the email might not go out as expected. When you view the Closed Activity for that contact, you can see that the email is there. However, when you open the email you just sent, you might see the yellow warning bar, alerting you that the message has not been delivered, with a message such as “This message has not yet been submitted for delivery. For more information, see help” (see Figure 20.22). Notice also in Figure 20.22 the Pending Send status.

Image

FIGURE 20.22 Warning message alert for undelivered email.

When the user setting for Outgoing is set to Microsoft Dynamics CRM for Outlook, the user must have the Microsoft Dynamics CRM for Outlook client installed and running. An alternative option is to use an email router or configure server-side synchronization, as explained earlier in this chapter; these options do not require Outlook to be running (see Figure 20.23).

Image

FIGURE 20.23 Outlook client email options.

You need to consider a few factors when using the Outlook client to send emails. First, the emails actually go out through Outlook. This happens when the user starts Outlook and Outlook synchronizes with the CRM server.


Caution

If the user prepares several emails through the web application, they will not be sent until the user opens Outlook. If the user does not open the Outlook application for a long time (for example, a month), this can be a real problem.


Using Outlook as the email gateway is the default configuration, and you must consider whether this configuration will work well with your business.


Note

If you want to have the emails composed through the web application sent out directly (not through Outlook), you can install and configure the CRM email router as described later in this chapter.


You also need to configure each user’s preferences to use server-side synchronization or email router, as shown in Figure 20.24. This has to be configured for every user because you might want to have some users use the Outlook client only.

Image

FIGURE 20.24 Configuring outgoing email access type to use server-side synchronization or the email router.

To properly configure the email router for outbound emails, go to Settings > Email Configuration > Mailboxes (see Figure 20.25), open the mailbox of the user for whom you want to configure the email router, and change the Synchronization Method drop-down for Incoming or Outgoing to the Server-Side Synchronization or Email Router option.

Image

FIGURE 20.25 Active mailboxes under Settings -> Email Configuration -> Mailboxes.


Tip

Remember that you must first install and configure the CRM email router before the Synchronization Method selection Email Router will work correctly.


Installing the Email Router and the Rule Deployment Wizard

You install the email router and the Rule Deployment Wizard by running the Microsoft Dynamics CRM Email Router Setup. To install the email router and the Rule Deployment Wizard, follow the instructions in this section.


Note

Download the Microsoft Dynamics CRM 2016 email router (either 32- or 64-bit) from Microsoft.com by searching for “Dynamics CRM 2016 email router” or by going directly to www.microsoft.com/en-us/download/details.aspx?id=50373.


The following operating systems support installing the email router:

Image Windows Vista

Image Windows 7

Image Windows 8

Image Windows 8.1

Image Windows 10

Image Windows Server 2012 and 2012 R2

To install and configure the email router on a server, follow these steps:

1. Log on to the computer you have designated for use with the email router (which can be either a server or a regular computer) as a Domain User with Local Administrator permissions if you are planning to use the Email Router in On-Premises deployment.

2. Locate the installation files. If the setup doesn’t start automatically after the files are extracted, navigate to the folder where you extracted the downloaded solution and double-click SetupEmailRouter.exe.

3. On the Welcome page, select whether you want to get updates. It is recommended to download the latest updates from the web (see Figure 20.26). To do this, select Get Updates for Microsoft Dynamics CRM (recommended) and click Next. Wait until the update process is complete and then click Next. If you are asked to install required components, click Install. The missing required components are automatically downloaded and installed. Once the required components are installed, click Next.

Image

FIGURE 20.26 Getting recommended updates.

4. Accept the license agreement.

5. On the Select Router Components page (see Figure 20.27), select either or both of these options:

Image Microsoft Dynamics CRM Email Router Service—This option installs the email router service and Email Router Configuration Manager.

Image Rule Deployment Wizard—This option installs the Rule Deployment Wizard, which is used to deploy rules for Forward mailbox users. Optionally, you can install this wizard on another computer that has access to the Exchange servers in the organization.

Image Click Next.

Image

FIGURE 20.27 Selecting components.

6. On the Select Install Location page, either accept the default file installation directory or browse for a different location and then click Next. The System Checks page appears, showing a summary of all system requirements for a successful email router installation (see Figure 20.28).

Image

FIGURE 20.28 System checks.


Note

If you receive an error indicating that you need to install the Microsoft Exchange Server MAPI client and Collaboration Data Object component before installing the CRM email router, navigate to www.microsoft.com/en-us/download/details.aspx?id=1004. Then rerun the installation.



Caution

Failed tests must be corrected before installation can continue. If there is a problem that will take time to correct, cancel the setup at this point, fix the problem, and restart the setup.


7. When all tests are successful, click Next.

8. On the Ready to Install the Application page that appears, click Install.

9. When the Email Router Setup is finished installing files, click Finish.


Note

By default, Microsoft Dynamics CRM users are set up with both the incoming email server type and the outgoing email server type Microsoft Dynamics CRM for Outlook. For web application users, you must change the incoming type to Email Router or Forward Mailbox and the outgoing type to Server-Side Synchronization or Email Router for each user.


Installing the Email Router on Multiple Computers

Should you wish, you can deploy and run the Microsoft Dynamics CRM email router on multiple computers in a Microsoft cluster to provide high availability and failover functionality. With Windows Server, this is known as failover clustering. Either of these server clustering technologies are supported with the email router.


Caution

The email router supports only an active/passive cluster deployment; it does not support an active/active cluster deployment.


You install the email router to the active primary node in the cluster as follows:

1. Run Email Router Setup on the active primary node in the cluster.


Tip

You do not have to install the email router on a computer that is running Microsoft Exchange Server. It is recommended to install the email router as the only application on a cluster.


2. Open the Email Router Configuration Manager on the first node and configure the email router. Verify that the email router is routing messages correctly to and from the Microsoft Dynamics CRM and email systems.

3. Copy all email router application files to the common storage or shared hard disk. By default, the files are located at Drive:Program FilesMicrosoft CRM Email.

4. Ensure that the following files are located on the common storage or shared disk so that they can be moved to the secondary node in the event of a failover. You can find these files in the Drive:Program FilesMicrosoft CRM EmailService folder:

Image Microsoft.Crm.Tools.EmailAgent.Configuration.bin

Image Microsoft.Crm.Tools.EmailAgent.SystemState.xml

Image Microsoft.Crm.Tools.EmailAgent.xml

Image Microsoft.Crm.Tools.Email.Management.config

Image EncryptionKey.xml (if encryption is enabled)

5. Update the following Windows Registry setting to allow the email router to use the shared disks:

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesMSCRMEmail

Change the ImagePath value to point to the shared disk drive that houses the email router files.

6. Restart the Microsoft CRM email router service for these changes to take effect.


Caution

The email router files should be manually secured on the common storage or shared disk. You should grant full control only to the service account running the email router service (Microsoft CRM Email Router) and to administrators who might have to update configuration files manually.


Install the email router to the passive node in the cluster, as follows:

1. Run Email Router Setup on the second node in the cluster.

2. Update the following Windows Registry setting to allow the email router to use the shared disks:

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesMSCRMEmail

Change the ImagePath value to point to the shared disk drive that houses the email router files.

3. Restart the Microsoft CRM Email Router Service for these changes to take effect.


Tip

Do not run the Email Router Configuration Manager and do not copy the files to the shared hard disks. Because the configuration files are placed on the shared disks, they are automatically available on the passive server.


Follow these steps to create the generic resource service to manage the Microsoft CRM email router service on the cluster:

1. On each node in the cluster, set the Microsoft CRM email router service to manually start on Windows start.

2. Ensure that each of the nodes is a member of PrivUserGroup {GUID} in Active Directory.

3. In the Failover Cluster Management pane, create a generic resource service with the following parameters:

Image Name—Create a descriptive name for the generic resource service, such as MSCRM Email Router.

Image Resource Type—Set this to the generic service.

Image Group—Set this to the cluster group.

Image Possible Owners—Add all nodes in the cluster.

Image Dependencies—If you are using Exchange Server and you have installed the email router on the Exchange server (which is not recommended), add Microsoft Exchange Information Store. Otherwise, just enter the network name registration in DNS.

Image Service Name—Set this to Microsoft CRM Email Router.

Image Start Parameters—Leave this blank.

Image Use Network Name for Computer Name—Leave this unchecked.

Image Do not checkpoint any Registry keys.

4. Bring the resource online. If necessary, configure the resource properties, such as the failover policies.


Tip

To verify and monitor the cluster, open Cluster Management and force a failover. Ensure that you see the services stop on node 1 and fail over to node 2.


Email Router Configuration Manager and Configuration Profiles

The Email Router Configuration Manager tool enables you to configure the email router. This tool is usually installed on the server running the email router. All configurations are saved in the file Microsoft.Crm.Tools.EmailAgent.xml.

You must configure at least one incoming email profile and one outgoing email profile to enable the email router to route email to and from your Microsoft Dynamics CRM organization. Depending on the complexity of your organization’s email system, you might have to create multiple incoming and outgoing configuration profiles. For example, if your organization requires incoming email router services for multiple email servers, you have to create one incoming configuration profile for each email server.

Authentication Types

Authentication for the email router is required for the connections to the email system and the user’s mailbox for each incoming and outgoing email profile.

Exchange Server supports only Windows authentication for the incoming profiles. Exchange Online supports clear-text authentication. For POP3-compliant servers, incoming profiles can use NTLM or clear-text authentication.

Clear-text authentication transmits unencrypted usernames and passwords. If you use clear-text authentication, you should do so only with Secure Sockets Layer (SSL). The Use SSL option should be selected, and the Network Port field (on the Advanced tab) must be set to a value appropriate for your environment. Verify your POP3 server requirements with your email administrator.

Outgoing (SMTP) profiles support Windows authentication, clear-text, and anonymous authentication types. The Exchange Online type supports only clear-text authentication.


Tip

Anonymous SMTP is valid only for internal, non-Internet-facing SMTP servers. Many SMTP servers do not support anonymous authentication. To ensure uninterrupted email flow from the email router, verify your SMTP server requirements with your email administrator.


Access Credentials

Depending on how you set the other configuration profile options, the options described in this section are available for specifying the username and password that the email router will use to access each mailbox the profile serves.


Caution

If you use access credentials that are valid for the email server but not for a particular mailbox, a 401 Access Denied error is generated when you test access.


Incoming profiles support the following access credentials:

Image Local System Account—This option requires a machine trust between the computer where the email router is running and the computer where the Exchange server is running. The email router must be included in the PrivUserGroup security group. For incoming profiles, this option is available only for Exchange Server (not for other POP3-compliant email servers).

Image User Specified—This option requires that each user enter his or her username and password in the Set Personal Options dialog box (available via File > Options in the Microsoft Dynamics CRM web client). This enables the email router to monitor mailboxes by using each user’s access credentials. When users change their domain password (for example, when it expires), they must update their password in Microsoft Dynamics CRM so that the email router can continue to monitor their mailbox. This option is available only in the On-Premises version of Microsoft Dynamics CRM.

Image Other Specified—This option enables the administrator to configure the email router to connect to user mailboxes as a specified user. The specified user must have full access to all the mailboxes that the incoming profile will serve, and it impersonates and “send as” permissions on the mailboxes configured for the profile.

Outgoing profiles support the following access credentials:

Image User Specified—This option requires a machine trust between the computer where the email router is running and the computer where Exchange server is running. The email router must be included in PrivUserGroup. For outgoing profiles, this is the only option available if you select the anonymous authentication type.

Image Other Specified—This option enables you to configure the email router to send email messages on each user’s behalf by using the access credentials of a specified user account that has full access to all the mailboxes that the outgoing profile will serve.


Note

For more information on the email router, see the Microsoft Dynamics CRM Implementation Guide, which you can download from www.microsoft.com/en-us/download/details.aspx?id=50039.


Configuring Email Routing for Multiple Configurations and Deployments

You can add or edit an email router configuration that contains a single incoming and outgoing method that routes email to the email server. In this configuration, you must specify the following components:

Image A name for display and reference

Image Whether the configuration is incoming or outgoing

Image The email transport type, such as Exchange or Exchange Online or POP3 for incoming and SMTP for outgoing

In addition, you can add or edit email router deployments. An email router deployment contains a URL to a Microsoft Dynamics CRM server computer, one incoming configuration, and one outgoing configuration. In an email router deployment object, you specify the following components:

Image A name for display and reference (required)

Image A URL to the Microsoft Dynamics CRM server computer (required)

Image A default incoming configuration (optional)

Image A default outgoing configuration (optional)

If you are using your local SMTP server, configure the Relay Restrictions property and have the reverse DNS records set for the server IP address. Also, to avoid being blacklisted for spam, be sure the domain is configured properly.

Configuring the CRM Email Router

The email router, like the Outlook client, requires both installation and configuration. The following sections describe how to properly configure the email router after it is installed.

Creating the Incoming Profile

To create a profile for the incoming email, open the Email Router configuration manager and click the New button on the right side of the screen. Figure 20.29 shows a new profile using Microsoft Exchange Server 2007.

Image

FIGURE 20.29 Configuring the incoming profile for Exchange.

You also have the option to use the POP3 protocol for incoming emails if you don’t use Microsoft Exchange Server.


Note

If you want to use the POP3 protocol with Microsoft Exchange, be aware that this service is disabled by default on Microsoft Exchange. To enable it, go to Control Panel > Administrative Tools > Services and double-click the service named Microsoft Exchange POP3 to open the settings. Change the startup type to Automatic, click the Apply button, and then click Start.



Caution

Because Exchange does not allow you to use POP3 for the domain administrator account, you need to create a separate account for using the POP3 accounts for the domain admin user only.


The Server field in the Location area must be a valid URL with http:// or https:// for the Microsoft Exchange option or a valid address without the protocol for the POP3 option.

The authentication type supported for Exchange can only be Windows authentication. The authentication types supported for POP3 are NTLM and clear-text authentication. If you are going to use the latter, it is recommended that you use SSL to secure the user’s credentials over the network. For the credentials, you can have the user specify a credential (discussed in the next section, “Deployments”), or you can enter a fixed username and password when creating the incoming profile.

To test the POP3 or Exchange information, you need to create an incoming profile. You can use the Microsoft Outlook application and create an account manually to be sure that you have the right connection and credential information.

Deployments

Next the profiles need to be configured for deployment to the appropriate protocol and email server type.

To configure the profiles for the email transport options, follow these steps:

1. Open the Email Router Configuration Manager.

2. Click New on the Configuration Profiles tab.

3. Create a profile for Incoming with the following values (see Figure 20.30):

Image Profile Name—Select Incoming.

Image Email Server Type—Select Exchange 2010 or 2013.

Image Location—Check Use Autodiscover.

Image Access Credentials—Select Local System Account.

Image

FIGURE 20.30 Incoming profile.

4. Check the check box at the bottom of the dialog to agree to share data and click OK.

5. Click New on the Configuration Profiles tab and create a profile for Outgoing with the following values (see Figure 20.31):

Image Profile Name—Select Outgoing.

Image Email Server Type—Select SMTP.

Image Authentication Type—Select Windows Authentication.

Image Location—Enter your email server here (for example mail.webfortis.com).

Image Access Credentials—Select Local System Account.

6. Check the check box at the bottom of the dialog to agree to share data and click OK.

Image

FIGURE 20.31 Outgoing profile.

After configuring the profiles, you need to create and set up the deployment where you want to use and apply the profiles. You will be able to set the profiles for each user after configuring the deployment in the next section, “Users, Queues, and Forward Mailboxes.”

You can configure the following types of deployments:

Image My Company—You use this option with On-Premises deployments (see Figure 20.32).

Image

FIGURE 20.32 Configuring deployment for On-Premises CRM organizations.

Image An Online Service Provider—You use this option when Internet-Facing Deployment (IFD) is enabled.

Image Microsoft Dynamics CRM Online—You use this option with Dynamics CRM Online deployments.

Image For more information about IFD, SEE CHAPTER 28, “Forms Authentication.”

Enter the appropriate values for the Microsoft Dynamics CRM server: http:// servername/organization for the My Company option or https://dev.crm.dynamics.com/ OrganizationName or https://disco.crm.dynamics.com/OrganizationName for Dynamics CRM Online option. Enter the access credentials and select Default Configuration Profiles. In this case, select your newly created Incoming and Outgoing profiles. The profiles selected here will be the default options for the users and queues, but you can change these values for each user, as described in the following section, if desired.

User, Queues, and Forward Mailboxes

If you select the Users, Queues, and Forward Mailboxes tab, you see the screen shown in Figure 20.33.

Image

FIGURE 20.33 Users, Queues, and Forward Mailboxes tab.

Click Load Data, and the tab changes as shown in Figure 20.34.

Image

FIGURE 20.34 Users and queues.


Note

Only the users and queues configured to use server-side synchronization or the email router are shown here. These mailboxes must have the email address approved as well in order to appear in this list.


On the Users, Queues, and Forward Mailboxes tab, you can configure specific incoming and outgoing profiles for each user if you want. Only the users and queues that have the mailbox configured for server-side synchronization or the email router will be displayed here. To configure a specific user or queue, select the user or queue and click Modify. The dialog shown in Figure 20.35 appears.

Image

FIGURE 20.35 Modifying specific user or queue configuration profiles.

You can change the incoming or outgoing profile for the selected user if you don’t want it to use the default configured profiles.

You can also test and verify that each profile functions correctly by click the Test Access button. This option performs a test that displays the results, with any errors in red or a successful message in green (see Figure 20.36).

Image

FIGURE 20.36 Testing access.


Tip

You can test the access for more than one mailbox at the time. To do so, make sure you select the mailboxes first by holding the Ctrl key while clicking the Test Access button to check multiple mailboxes.


You can also disable the mailboxes for the user or queue from this tab. By clicking the Disable button, you disable the mailbox and change the button name to Enable so you can re-enable the mailbox if it is disabled.

When you are done with the changes, you must click the Publish button to save the changes and apply them to the email router service. You don’t need to restart the service because the updates are automatically updated when you click Publish (see Figure 20.37).

Image

FIGURE 20.37 Publishing configurations.

Forward Mailboxes

You can use Forward mailboxes to process incoming emails. This type of mailbox requires a dedicated mailbox to receive and forward emails. There are a couple reasons you might want to use Forward mailboxes. Primarily, you can use a single set of credentials for a single mailbox; however, you benefit from polling (only one mailbox is polled) and get to take advantage of Exchange forwarding rules.

Forward mailboxes can process incoming emails without using Microsoft Outlook. This option works only with Microsoft Exchange Server (both Online and On-Premises), and it requires a dedicated mailbox to process the incoming emails. The users or queues that want to use this option must have some rules deployed that you can create using the Rule Deployment Wizard, described later in this chapter. The email is first received by the user’s mailbox and then is forwarded to the router’s mailbox.


Note

Many users can forward their emails to a single router mailbox.


The CRM email router service polls the router mailbox, looking for incoming messages. When it finds an email, it inserts that email into CRM as a new email activity for the user or queue that forwarded the email. The email is then deleted from the router mailbox, depending on the configurations.

Microsoft recommends this technique if you are using Microsoft Exchange Server as your primary email server. However, you don’t actually need to set up a Forward mailbox to receive emails. The incoming profile configured to use Exchange suffices in most cases.

The outgoing emails are processed asynchronously, and the default polling is scheduled for every 60 seconds (about 1 minute), so you must wait that amount of time before the emails are actually sent. (This polling is set to 1,000 seconds [about 15 minutes] for email router processing.)


Tip

To increase the speed at which outgoing emails are sent, you can edit the configuration file Microsoft.Crm.Tools.EmailAgent.xml (which you can find at C:Program FilesMicrosoft CRM EmailService)—specifically the SchedulingPeriod element. It is a good idea to change its default value to 10 seconds.


On the Forward Mailboxes tab (see Figure 20.38), you can also test access as you did for the user and queues, and you can disable or re-enable the Forward mailboxes.

Image

FIGURE 20.38 Forward Mailboxes tab.

You must create a Forward mailbox using this tab in order to see it. The Forward mailboxes configured in Dynamics CRM won’t show up here automatically. To create a new Forward mailbox, click New, and the dialog shown in Figure 20.39 appears. Here you must enter a name, the email address, and the incoming configuration profile.

Image

FIGURE 20.39 Forward Mailbox dialog.

Tracking Incoming Emails

You can track incoming emails in two ways:

Image By using the CRM tracking token—The token works by appending a code in the subject of the email with a form similar to CRM:0001006.

Image Through message filtering and correlation—Filtering and correlation to track incoming emails involves a method that doesn’t require appending data on the email’s subject line. Instead, it uses an intelligent way to figure out the thread of the email using the email’s sender, the email’s recipient, the email subject, and any CC. This method is not 100% effective, but you can use it if you don’t want CRM tracking tokens to alter emails.

Image To learn more about how to configure incoming email tracking, SEE CHAPTER 17, “Settings.”


Tip

By default, only incoming emails that are received in response to emails sent from Dynamics CRM are tracked. If you want CRM to track all incoming emails, you must change your personal settings.


You can select to track all emails, the emails that are responses to CRM emails, email messages from CRM records that are email enabled, or the email messages from CRM leads, contacts, and accounts.


Note

The option that says Allow other Microsoft Dynamics CRM Users to Send Email on Your Behalf is available only if your user is configured to receive or send emails through the CRM email router.


You can see all the incoming emails CRM tracks by going to Activities and then changing the view selection from My Activities to All Emails.

One of the most common issues related to received emails is that the From email address sometimes cannot be mapped properly. This is shown with an alert icon with an X in it, as shown in Figure 20.40. This can happen for two reasons: Either the email address doesn’t exist (that is, no value for email on the record) or the contact has set the value as Do Not Allow for email.

Image

FIGURE 20.40 Email with an error message.

Queues

Queues are primarily used for general incoming emails that are not related to a specific user. A common example for using a queue is to receive emails sent to your organization for queries related to general information, support, or customer support. In these cases, you could create queues with related email addresses similar to info@yourdomain.com, support@yourdomain.com, and customerservice@yourdomain.com, for example.

To track emails using these addresses, you must first create a queue by going to Settings > Business Management > Queues. Then you need to click New to create a new queue and then set the email options accordingly (see Figure 20.41).

Image

FIGURE 20.41 Creating a new Info queue.


Tip

The good thing about using queues to receive and track emails is that a queue doesn’t consume a license in CRM, so if you have a generic mailbox for info or support, you don’t need to create a user for it and consume a CRM license for it.


Rule Deployment Wizard

Users or queues configured as Forward mailboxes need server rules installed on Microsoft Exchange to forward emails to the router mailbox. These rules send a copy of each message received by a Microsoft Dynamics CRM user to the Microsoft Dynamics CRM system mailbox. From the Microsoft Dynamics CRM system mailbox, the email router retrieves the messages and creates an email activity in Microsoft Dynamics CRM.

To deploy the Microsoft Dynamics CRM user inbox rules, you can use the Rule Deployment Wizard. You can run it any time to add or change the inbox rules for your Microsoft Dynamics CRM users.


Caution

The Rule Deployment Wizard can only deploy rules to Exchange Server mailboxes. You cannot deploy rules by using the Rule Deployment Wizard with POP3 email servers or Exchange Online. To use the wizard, you also need owner access on the users’ mailboxes.


You can access this wizard by following these steps:

1. On the computer where you have installed the email router, run the Rule Deployment Wizard. The first time you run the Rule Deployment Wizard, you will see a welcome page, as shown in Figure 20.42.

Image

FIGURE 20.42 Welcome to the Rule Deployment Wizard.


Note

The Rule Deployment Wizard does not have to be run on a computer with an instance of Exchange Server. To run the Rule Deployment Wizard, the following must be true:

Image You must be logged on as a Microsoft Dynamics CRM user with a security role. (The user can be in restricted access mode.)

Image You must be a local administrator on the computer where the wizard is running.

Image You must have Exchange administrative permissions.

To deploy rules to the mailbox of a Microsoft Dynamics CRM user, the person running the Rule Deployment Wizard must have Exchange administrative permissions for the mailbox. Use the Exchange System Manager and the Exchange Delegation Wizard to designate Exchange administrators or make sure that the person running the Rule Deployment Wizard has full permissions on the Exchange mailbox store or storage group where the users’ mailboxes are located.


2. Click Next on the welcome page.

3. Enter the CRM deployment type and CRM server address as well as the credentials to be used (see Figure 20.43). Click Next.

Image

FIGURE 20.43 Selecting the deployment for the Rule Deployment Wizard.

4. Enter the forward email address and the email server type, which can be Exchange 2007 or Earlier or Exchange 2010 or 2013 (see Figure 20.44). Click Next. The wizard tries to locate the mailboxes you have configured as Forward mailbox in the Dynamics CRM deployment you selected before (see Figure 20.45).

Image

FIGURE 20.44 Specifying the forward email address.

Image

FIGURE 20.45 Selecting users and queues.

5. Select the user or queue for which you want to deploy the rules and click Next.

Creating a Rule Manually

For POP3 email servers that support email system rules where an email message can be forwarded as an attachment, you can create a rule manually, as follows:

1. Open Outlook.

2. If you are working with Outlook 2007, choose Tools > Rules and Alerts. If you are working with Outlook 2010, 2013, or 2016, click Rules on the ribbon.

3. On the Email Rules tab, click New Rule; or click Create Rule if you are in Outlook 2016.

4. Select the Start from a Blank Rule option, make sure Check Messages When They Arrive is selected, and then click Next. Or select Advanced options if you are in Outlook 2016.

5. Select Where My Name Is in the To or Cc Box (see Figure 20.46) and then click Next.

Image

FIGURE 20.46 Outlook Rules Wizard.

6. Select Forward It to People or Public Group as an Attachment and then edit the rule description by clicking People or Public Group (see Figure 20.47).

Image

FIGURE 20.47 Outlook Rules Wizard conditions.

7. Select the name of your email router Forward mailbox, click the To button, and click OK.

8. Click Next two times.

9. Make sure the Turn on This Rule option is selected and then click Finish.

10. Make sure the rule is at the top of the list and then click Apply.


Note

For Exchange Online, you can create the rule manually (as described here) or by using Outlook Web Access.


Summary

This chapter describes how Microsoft CRM processes incoming and outgoing emails and covers the available options for sending and receiving emails that will be tracked as activities in Dynamics CRM. It also describes the different system configuration options to track the incoming emails: server-side synchronization, the email router service, the Microsoft Outlook client, and Forward mailboxes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset