Email Server Side Configuration And Microsoft Dynamics CRM



In this post, Microsoft dynamics CRM online experts will explain about Email server side configuration in Microsoft CRM. You should read the pre-requisites and the method shared by them carefully for the best results.

Today I would like to explain about Email server side configuration in MS CRM.

Pre-Requisites

  1. Dynamics CRM On-Premise Should be installed in the server.  Create an On-premise Organization should in server.
  2. Information regarding Mailboxes to connect to a user
  3. Server name/URL FQDN for Exchange Web Services & Version (2007/2010/2013/), or a Pop3 server address.
    • An exchange address will be in the format given below
      (http(s)://Server.domain.com/EWS/Exchange.asmx)
    • For Exchange, you can just append the /EWS/Exchange.asmx to the address that is used for Outlook Web Access.
    • If you access OWA via a URL such as https://Mail.MyCompanyDomain.com/OWA. Just replace /OWA with /EWS/Exchange.asmx in. This will look like  https://Mail.MyCompanyDomain.com/EWS/Exchange.asmx
    • A Pop3 server would have just a server.domain.com format.
  4. We need User Credentials for configuring Mail boxes (usually windows credentials). Credentials will be in the format of an email address (e.g.:username@domain.com) or domain\username.
  5. Microsoft Dynamics CRM URL is required. When we create an organization the CRM web application will be created. URL format looks like https://CRMCompany.CompanyDomain.COM:444 or https://ipaddress:444/

1. Email Server Side Configuration

1.1. Email Server Profile

  1. Navigate to Settings --> Email Configuration
  2. Click on Email Server Profiles
  3. In Email Server Profiles, ~ Click on New Button
  4. Click on Exchange Profile
  5. Incoming Server locations and Outgoing Server Location Should be given Exchange URL(for EG: https://apj.cloudmail.xyz.com/ews/exchange.asmx)
  6. Select Authenticate as “Credentials Specified by a User or Queue”. There are actually four modes to authenticate your Email Server Profile.
    • Credentials Specified by a User or Queue
    • Credentials Specified in Email Server Profile
    • Windows Integrated Authentication
    • Without Credentials (Anonymous)

1.1.1 Credentials Specified by a User or Queue

The user or queue credentials you have given in mailboxes of the MSCRM are used to sending or receiving mails for that particular user or Queue.

1.1.2 Credentials Specified in Email Server Profile

If you select this option at Email Server profile creation, Email server Profile will ask for credentials which will be used for sending and receiving emails for all the mailboxes of all users and queues associated with the profile. While using this option, see that the credentials has delegate permissions or impersonation on the mailboxes associated.

If the CRM Organization is not enabled with SSL and the URL comes with normal HTTP protocol, then the User Name and Password will be seen as disabled. To make them Enable,

In 2011 CRM,
Add the registry key called “DisableSecureDecryptionKey”
under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM and set value to 1

In 2013 CRM,
Add new DWORD value registry key with name “AllowCredentialsEntryViaNonSecureChannels”
under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM and set value to 1. (This is not recommended by MICROSOFT, but this is one of the way)

You can write a Power-shell commend to execute the same

“Add-PSSnapinMicrosoft.Crm.PowerShell
$mycred = Get-Credential
$dwsurl = "http://xxxxxxxxxxxxxxx:5555"
$setting = Get-Crmsetting -settingtypeServerSideSyncEmailSettings -credential $mycred -dwsserverurl $dwsurl
$setting.AllowCredentialsEntryViaNonSecureChannels=$True
Set-CrmSetting $setting
Get-CrmSettingTraceSettings”
From 2013 SP1 ,2015 and 2016 MSCRM,
The same functionality is controlled from Deployment Properties.

“AllowCredentialsEntryViaInsecureChannels” and “ECAllowNonSSLEmail”. These setting are within the DeploymentProperties table within the MSCRM_CONFIG database.

(Recommended way by Microsoft)
When SSL is not enabled and to save the credentials, run this following Power-Shell script

“add-pssnapinMicrosoft.Crm.Powershell
$itemSetting = new-object ‘System.Collections.Generic.KeyValuePair[String,Object]'("AllowCredentialsEntryViaInsecureChannels",1)
$configEntity = New-Object "Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity"
$configEntity.LogicalName="Deployment"
$configEntity.Attributes = New-Object "Microsoft.Xrm.Sdk.Deployment.AttributeCollection"
$configEntity.Attributes.Add($itemSetting)
Set-CrmAdvancedSetting -Entity $configEntity”

To allow the use of connections to servers that do not use SSL, run this following Power-Shell Script

“add-pssnapinMicrosoft.Crm.Powershell
$itemSetting = new-object 'System.Collections.Generic.KeyValuePair[String,Object]'("ECAllowNonSSLEmail",1)
$configEntity = New-Object "Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity"
$configEntity.LogicalName="Deployment"
$configEntity.Attributes = New-Object "Microsoft.Xrm.Sdk.Deployment.AttributeCollection"
$configEntity.Attributes.Add($itemSetting)
Set-CrmAdvancedSetting -Entity $configEntity ”

You can achieve the same using SQL Update commands on DeploymentProperties table from MSCRM Config Database.

When SSL is not enabled and to save the credentials, Run this SQL Scripts

“selectColumnName,BitColumn from DeploymentProperties
whereColumnName = 'AllowCredentialsEntryViaInsecureChannels' “

“Update DeploymentProperties
Set BitColumn = 1
Where ColumnName = 'AllowCredentialsEntryViaInsecureChannels' “

To allow the use of connections to servers that do not use SSL, Run the SQL Script to update the values

“selectColumnName,BitColumn from DeploymentProperties
whereColumnName = 'ECAllowNonSSLEmail' “

“Update DeploymentProperties
Set BitColumn = 1
Where ColumnName = 'ECAllowNonSSLEmail' “

If you are using Credentials Specified in Email server Profile, There are few advanced settings to be done.

1.1.3 Windows Integrated Authentication

The credentials with which the Microsoft Dynamics CRM Asynchronous Service has been configured will be used. This is generally configured for Exchange and SMTP email server types.

1.1.4 Without Credentials (Anonymous):

This will be used only if you don’t have credentials to login for exchange servers. Which is not advisable and not a valid.

Click on Save Button.

Note: Below advanced settings should not be used until or unless you will be good with Email Systems and Exchange servers

1.2 Advanced Settings

1.2.1 Incoming and Outgoing Connection

This section will appear only when Auto Discover Server Location is set to No.

Incoming Port:
This field shows the port on the email server for accessing incoming email.

Outgoing Port:
This field shows the port on the email server for accessing outgoing email.

1.2.2 Additional Settings

Process Email From:
Email received after the date and time will be processed by server-side synchronization for all mailboxes associated with this profile.

Minimum Polling Intervals in Minutes:
The polling interval determines how often server-side synchronization polls your mailboxes for new email messages. The recommended value for this field is 0.

Maximum Concurrent Connections:
The maximum number of simultaneous connections that can be made by CRM Online to the corresponding Exchange Server per mailbox. Increase the value to allow more parallel calls to Exchange Server to improve performance or reduce the value if there are errors on Exchange due to a large number of calls from CRM. The default value for this field is 27.

Move Failed Emails to Undeliverable Folder:
If there’s an error in tracking email messages in CRM as email activities, and if this option is set to Yes, the email message will be moved to the Undeliverable folder at the user’s inbox. If this folder does not exist, it will be created when the first email failed.

1.2.3 Email Notifications

This option lets the owner of the email server profile (as shown on the General tab) get email notifications if more than 50% of the mailboxes that are associated with this email server profile failed in the last hour. A mailbox is considered failed if CRM tried and failed to sync it completely in the last hour.

The percentage of mailboxes that triggers an email is not configurable. If this option is set to Yes, the maximum number of emails you will get is one email per hour, and only the owner of the email server profile will get these emails.

1.3 Email Configuration Settings

  1. Navigate to Settings --> Email Configuration
  2. Click on Email Configuration Settings

  3. Window Opens, and Configure the fields as per Screen shot

  4. Click on Ok Button

1.4 MailBoxes

  1. Navigate to Settings --> Email Configuration

  2. Click on Mailboxes

  3. My Active Mailboxes view opens on Mailboxes
  4. Change the view by clicking on the view Dropdowns.
  5. Select “Active User Mailboxes”.
  6. Click on the user you want to Configure MailBox.
  7. Window Opens, and Configure the fields as per Screen shot for all users
  8. Set “Allow use credentials for email processing” to Yes
  9. Set Username, Password and select Server Profile
  10. Use same mail address to all the users for testing purpose.
  11. Click on Save Button
  12. Click on Approve Emails, then Click on Test & Enable Mailbox


  13. Status will be updated as below

1.5 Active Queue Mailboxes

  1. Select the view to Active Queue Mailboxes
  2. Click on each record and Configure as the configuration we have done for Users (Refer to Section 1.4)
  3. Below is the screenshot for Queues Mailbox.

Bibliography or Other References

https://technet.microsoft.com/en-us/library/mt622063.aspx
https://technet.microsoft.com/en-us/library/dn832114.aspx
https://technet.microsoft.com/en-us/library/dn946907.aspx
https://technet.microsoft.com/en-us/library/dn832085.aspx
https://technet.microsoft.com/en-us/library/dn887218.aspx
https://technet.microsoft.com/en-us/library/dn531049.aspx
https://technet.microsoft.com/en-us/library/dn850386.aspx
https://technet.microsoft.com/en-in/library/dn531109.aspx

In case there is any point left by Microsoft Dynamics CRM online experts, you can tell in the comments. For detailed knowledge, you can anytime write to them and ask your questions and get expert response.

Ethan Millar is a Technical Writer at Aegis Softtech

Disqus Comments Loading..