How to configure the outgoing e-mail functionality in Microsoft Dynamics CRM 3.0


Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows registry

INTRODUCTION


This article describes how to configure the outgoing e-mail functionality in Microsoft Dynamics CRM 3.0.

More Information


Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

To configure the outgoing e-mail functionality in Microsoft Dynamics CRM, follow the appropriate steps.

Microsoft Dynamics CRM is installed on a computer that is running Microsoft Windows Small Business Server 2003

In this situation, Microsoft Exchange Server 2003 is not installed on the computer that is running Windows Small Business Server 2003 (Windows SBS). Exchange 2003 can be installed on another computer in the same domain. However, you do not want to use Exchange 2003 to forward the e-mail messages that originate in Microsoft Dynamics CRM.

To configure the outgoing e-mail functionality, follow these steps:
  1. Verify that the port that is used by the Simple Mail Transfer Protocol (SMTP) virtual server can be accessed. To do this, follow these steps:
    1. Click Start, click Run, type cmd, and then click OK.
    2. Type telnet Server_name 25, and then press ENTER.

    If port 25 is available, the connection will be established. If the port is unavailable, you will receive the following error message:
    Connection To <Server_name>…Could not open connection to the host, on port 25: Connect failed.
    Notes
    • <Server_name> is a placeholder for the actual name of the Microsoft Dynamics CRM server.
    • By default, the SMTP virtual server uses port 25.
  2. Verify that the SMTP virtual server is installed on the Microsoft Dynamics CRM server. To do this, follow these steps:
    1. Click Start, click Run, type inetmgr, and then click OK.
    2. In the Internet Information Services (IIS) Manager dialog box, verify that SMTP Virtual Server is displayed.
  3. If the SMTP virtual server is not installed on the Microsoft Dynamics CRM server, install the SMTP virtual server. To do this, follow these steps:
    1. Click Start, point to Control Panel, and then click Add or Remove Programs.
    2. Click Add/Remove Windows Components.
    3. In the Windows Components Wizard dialog box, click Application Server, and then click Details.
    4. Click Internet Information Services (IIS), and then click Details.
    5. Click to select the following check boxes:
      • Common Files
      • Internet Information Services Manager

      • SMTP Service

      • World Wide Web Service
    6. Select any other components that you want to use, and then click OK two times.
    7. Click Next, and then click Finish.
  4. Verify that the SMTP registry entries exist. Then, delete the SMTP registry entries. To do this, follow these steps:
    1. Click Start, click Run, type regedit, and then click OK.
    2. Locate the following registry subkey:
      My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM
    3. Click the MSCRM registry subkey, and then verify that the following registry entries exist:
      • SMTPServer
      • SMTPServerPort
      • SMTPAuthenticate
      • SMTPSendUserName
      • SMTPSendPassword
      • SMTPUseSSL
  5. If these registry entries exist, back up the registry entries, and then delete them. To do this, follow these steps:
    1. Click all the registry entries that exist.
    2. On the File menu, click Export.
    3. In the Export Registry File dialog box, type a name in the File name box for the backup file that will store the registry entries, and then click Save.
    4. Right-click each registry entry, and then click Delete.
  6. Click Start, click Run, type iisreset, and then click OK.
  7. Try to send an e-mail message in Microsoft Dynamics CRM.

Microsoft Dynamics CRM is installed on a computer that is running Microsoft Windows Server 2003

In this situation, Exchange 2003 is not present in the domain. Or, Exchange 2003 is present in the domain. However, you do not want to use Exchange 2003 to forward the e-mail messages that originate in Microsoft Dynamics CRM.

To configure the outgoing e-mail functionality, follow the steps in the "Microsoft Dynamics CRM is installed on a computer that is running Microsoft Windows Small Business Server" section.

The Microsoft Dynamics CRM server and Exchange 2003 are installed on the same computer

In this situation, the Windows SBS edition of Microsoft Dynamics CRM is installed on a computer that is running Windows SBS.

To configure the outgoing e-mail functionality, follow these steps:
  1. Verify that the port that is used by the SMTP virtual server can be accessed. To do this, follow these steps:
    1. Click Start, click Run, type cmd, and then click OK.
    2. Type telnet Server_name 25, and then press ENTER.

    If port 25 is available, the connection will be established. If the port is unavailable, you will receive the following error message:
    Connection To Server_name…Could not open connection to the host, on port 25: Connect failed.
    Notes
    • Server_name is a placeholder for the actual name of the Microsoft Dynamics CRM server.
    • By default, the SMTP virtual server uses port 25.
  2. Configure the relay restrictions. To do this, follow these steps:
    1. Click Start, point to Programs, point to Microsoft Exchange, and then click System Manager.
    2. Click Servers, click the name of the computer that is running Exchange 2003, click Protocols, and then click SMTP.
    3. Right-click Default SMTP Virtual Server, click Properties, and then click the Access tab.

    4. In the Relay Restrictions area, click Relay.

    5. Verify that the Only the list below option is enabled, and then add the Microsoft Dynamics CRM server to the list.

    6. Restart the SMTP service. To do this, follow these steps:
      1. Click Start, point to Programs, point to Administrative Tools, and then click Services.
      2. Right-click Simple Mail Transfer Protocol (SMTP), and then click Restart.
  3. Verify the connections control. To do this, follow these steps:
    1. Click Start, point to Programs, point to Microsoft Exchange, and then click System Manager.
    2. Click Servers, click the name of the computer that is running Exchange 2003, click Protocols, and then click SMTP.
    3. Right-click Default SMTP Virtual Server, click Properties, and then click the Access tab.
    4. In the Connections Control area, click Connection.

    5. By default, the All except the list below option is enabled. If the Microsoft Dynamics CRM server is in the list, contact the Exchange 2003 administrator to determine why the Microsoft Dynamics CRM server is in the list.

      Note For the e-mail functionality in Microsoft Dynamics CRM to work correctly, the Microsoft Dynamics CRM server must be able to connect to the computer that is running Exchange 2003.

    6. If the Only the list below option is enabled, add the Microsoft Dynamics CRM server to the list. This enables the Microsoft Dynamics CRM server to connect to the computer that is running Exchange 2003.
    7. If you made any changes to the Connection Control settings, restart the SMTP service. To do this, follow these steps:
      1. Click Start, point to Programs, point to Administrative Tools, and then click Services.
      2. Right-click Simple Mail Transfer Protocol (SMTP), and then click Restart.
  4. Verify that the SMTP registry entries exist. To do this, follow these steps:
    1. Click Start, click Run, type regedit, and then click OK.
    2. Locate the following registry subkey:
      My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM
    3. Click the MSCRM subkey, and then verify that the following registry entries exist:
      • SMTPServer
      • SMTPServerPort
      • SMTPAuthenticate
      • SMTPSendUserName
      • SMTPSendPassword
      • SMTPUseSSL
  5. If these registry entries exist, back up the registry entries, and then delete them. To do this, follow these steps:
    1. Click all the registry entries that exist.
    2. On the File menu, click Export.
    3. In the Export Registry File dialog box, type a name in the File name box for the backup file that will store the registry entries, and then click Save.
    4. Right-click each registry entry, and then click Delete.
  6. Click Start, click Run, type iisreset, and then click OK.
  7. Try to send an e-mail message in Microsoft Dynamics CRM.

Microsoft Dynamics CRM and Exchange 2003 are installed on different computers in the same domain

In this situation, you want Microsoft Dynamics CRM to send e-mail messages to the computer that is running Exchange 2003 to forward them. Additionally, the computer that is running Exchange 2003 allows for anonymous access. Therefore, the authentication mode in the Authentication dialog box in Exchange System Manager is configured as follows:
  • The Anonymous access check box is selected.
  • The Basic authentication check box is cleared.
To configure the outgoing e-mail functionality, follow these steps:
  1. Verify that the port that is used by the SMTP virtual server can be accessed. To do this, follow these steps:
    1. Click Start, click Run, type cmd, and then click OK.
    2. Type telnet Server_name 25, and then press ENTER.

    If port 25 is available, the connection will be established. If the port is unavailable, you will receive the following error message:
    Connection To Server_name…Could not open connection to the host, on port 25: Connect failed.
    Notes
    • Server_name is a placeholder for the actual name of the Microsoft Dynamics CRM server.
    • By default, the SMTP virtual server uses port 25.
  2. Configure the SMTP service on the Microsoft Dynamics CRM server to forward e-mail messages to the computer that is running Exchange 2003. To do this, follow these steps:
    1. On the Microsoft Dynamics CRM server, start Internet Information Services (IIS). To do this, click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
    2. In IIS Manager, expand Default SMTP Virtual Server, right-click Domains, point to New, and then click Domain.
    3. In the New SMTP Wizard, click Remote under Specify the domain Type, and then click Next.
    4. In the Name box, type the domain name, and then click Finish.
    5. Right-click the new domain that you added in step 2b through step 2d, and then click Properties.
    6. On the General tab, click to select the Allow incoming mail to be relayed to this domain check box, and then click Forward all mail to smart host. In the box under Forward all mail to smart host, type the name of the computer that is running Exchange 2003, and then click OK.
    7. Restart the SMTP service. To do this, follow these steps:
      1. Click Start, click Administrative Tools, and then click Services.
      2. Right-click Simple Mail Transfer Protocol (SMTP), and then click Restart.
  3. Configure the relay restrictions. To do this, follow these steps:
    1. Click Start, point to Programs, point to Microsoft Exchange, and then click System Manager.
    2. Click Servers, click the name of the computer that is running Exchange 2003, click Protocols, and then click SMTP.
    3. Right-click Default SMTP Virtual Server, click Properties, and then click the Access tab.

    4. In the Relay Restrictions area, click Relay.

    5. Verify that the Only the list below option is enabled, and then add the Microsoft Dynamics CRM server to the list.

    6. Restart the SMTP service. To do this, follow these steps:
      1. Click Start, point to Programs, point to Administrative Tools, and then click Services.
      2. Right-click Simple Mail Transfer Protocol (SMTP), and then click Restart.
  4. Verify the connections control. To do this, follow these steps:
    1. Click Start, point to Programs, point to Microsoft Exchange, and then click System Manager.
    2. Click Servers, click the name of the computer that is running Exchange 2003, click Protocols, and then click SMTP.
    3. Right-click Default SMTP Virtual Server, click Properties, and then click the Access tab.
    4. In the Connections Control area, click Connection.

    5. By default, the All except the list below option is enabled. If the Microsoft Dynamics CRM server is in the list, contact the Exchange 2003 administrator to determine why the Microsoft Dynamics CRM server is in the list.

      Note For the e-mail functionality in Microsoft Dynamics CRM to work correctly, the Microsoft Dynamics CRM server must be able to connect to the computer that is running Exchange 2003.

    6. If the Only the list below option is enabled, add the Microsoft Dynamics CRM server to the list. This enables the Microsoft Dynamics CRM server to connect to the computer that is running Exchange 2003.
    7. If you made any changes to the Connection Control settings, restart the SMTP service. To do this, follow these steps:
      1. Click Start, point to Programs, point to Administrative Tools, and then click Services.
      2. Right-click Simple Mail Transfer Protocol (SMTP), and then click Restart.
  5. Verify that the SMTP registry entries exist. If the registry entries do not exist, create them. To do this, follow these steps:
    1. Click Start, click Run, type regedit, and then click OK.
    2. Locate the following registry subkey:
      My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM
    3. Create the following registry entries if they do not exist.
      • Registry entry: SMTPServer
        Type: String
        Value: exchange01

        Note exchange01 is a placeholder for the computer that is running Exchange 2003.
      • Registry entry: SMTPServerPort
        Type: DWORD

        Value: 25 (19 in hexadecimal)
      • Registry entry: SMTPAuthenticate
        Type: DWORD
        Value: 0

        Note The value of 0 is used for anonymous access. The value of 1 is used for basic authentication. The value of 2 is used for integrated authentication.
      • Registry entry: SMTPUseSSL
        Type: DWORD
        Value: 0
  6. Click Start, click Run, type iisreset, and then click OK.
  7. Try to send an e-mail message in Microsoft Dynamics CRM.
If you want to determine the authentication modes that are enabled by the SMTP virtual server on the computer that you are using, follow these steps:
  1. Click Start, point to Programs, point to Microsoft Exchange, and then click System Manager.
  2. In Exchange System Manager, Expand Servers, expand Exchange_server, expand Protocols, and then expand SMTP.
  3. Right-click Default SMTP Virtual Server, click Properties, click the Access tab, and then click Authentication.

Microsoft Dynamics CRM and Exchange 2003 are installed on different computers in the same domain

In this situation, you want Microsoft Dynamics CRM to send e-mail messages to the computer that is running Exchange 2003 to forward them. Additionally, the computer that is running Exchange 2003 does not allow for anonymous access. Therefore, the authentication mode in the Authentication dialog box in Exchange System Manager is configured as follows:
  • The Anonymous access check box is cleared.
  • The Basic authentication check box is selected.
To configure the outgoing e-mail functionality, follow these steps:
  1. Verify that the port that is used by the SMTP virtual server can be accessed. To do this, follow these steps:
    1. Click Start, click Run, type cmd, and then click OK.
    2. Type telnet Server_name 25, and then press ENTER.

    If port 25 is available, the connection will be established. If the port is unavailable, you will receive the following error message:
    Connection To Server_name…Could not open connection to the host, on port 25: Connect failed.

    Notes
    • Server_name is a placeholder for the actual name of the Microsoft Dynamics CRM server.
    • By default, the SMTP virtual server uses port 25.
  2. Configure the SMTP service on the Microsoft Dynamics CRM server to forward e-mail messages to the computer that is running Exchange 2003. To do this, follow these steps:
    1. On the Microsoft Dynamics CRM server, start IIS. To do this, click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
    2. In IIS Manager, expand Default SMTP Virtual Server, right-click Domains, point to New, and then click Domain.
    3. In the New SMTP Wizard, click Remote under Specify the domain Type, and then click Next.
    4. In the Name box, type the domain name, and then click Finish.
    5. Right-click the new domain that you added in step 2b through step 2d, and then click Properties.
    6. On the General tab, click to select the Allow incoming mail to be relayed to this domain check box, and then click Forward all mail to smart host. In the box under Forward all mail to smart host, type the name of the computer that is running Exchange 2003, and then click OK.

    7. Restart the SMTP service. To do this, follow these steps:
      1. Click Start, point to Programs, point to Administrative Tools, and then click Services.
      2. Right-click Simple Mail Transfer Protocol (SMTP), and then click Restart.
  3. Configure the relay restrictions. To do this, follow these steps:
    1. Click Start, point to Programs, point to Microsoft Exchange, and then click System Manager.
    2. Click Servers, click the name of the computer that is running Exchange 2003, click Protocols, and then click SMTP.
    3. Right-click Default SMTP Virtual Server, click Properties, and then click the Access tab.

    4. In the Relay Restrictions area, click Relay.

    5. Verify that the Only the list below option is enabled, and then add the Microsoft Dynamics CRM server to the list.

    6. Restart the SMTP service. To do this, follow these steps:
      1. Click Start, point to Programs, point to Administrative Tools, and then click Services.
      2. Right-click Simple Mail Transfer Protocol (SMTP), and then click Restart.

  4. Verify the connections control. To do this, follow these steps:
    1. Click Start, point to Programs, point to Microsoft Exchange, and then click System Manager.
    2. Click Servers, click the name of the computer that is running Exchange 2003, click Protocols, and then click SMTP.
    3. Right-click Default SMTP Virtual Server, click Properties, and then click the Access tab.
    4. In the Connections Control area, click Connection.

    5. By default, the All except the list below option is enabled. If the Microsoft Dynamics CRM server is in the list, contact the Exchange 2003 administrator to determine why the Microsoft Dynamics CRM server is in the list.

      Note For the e-mail functionality in Microsoft Dynamics CRM to work correctly, the Microsoft Dynamics CRM server must be able to connect to the computer that is running Exchange 2003.

    6. If the Only the list below option is enabled, add the Microsoft Dynamics CRM server to the list. This enables the Microsoft Dynamics CRM server to connect to the computer that is running Exchange 2003.
    7. If you made any changes to the Connection Control settings, restart the SMTP service. To do this, follow these steps:
      1. Click Start, point to Programs, point to Administrative Tools, and then click Services.
      2. Right-click Simple Mail Transfer Protocol (SMTP), and then click Restart.
  5. Verify that the SMTP registry entries exist. If the registry entries do not exist, create them. To do this, follow these steps:
    1. Click Start, click Run, type regedit, and then click OK.
    2. Locate the following registry subkey:
      My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM
    3. Create the following registry entries if they do not exist:
      • Registry entry: SMTPServer
        Type: String
        Value: exchange01

        Note exchange01 is a placeholder for the computer that is running Exchange 2003.
      • Registry entry: SMTPServerPort
        Type: DWORD

        Value: 25 (19 in hexadecimal)
      • Registry entry: SMTPAuthenticate
        Type: DWORD
        Value: 1

        Note The value of 0 is used for anonymous access. The value of 1 is used for basic authentication. The value of 2 is used for integrated authentication.
      • Registry entry: SMTPSendUserName
        Type: String

        Value: domain1\administrator

        Note domain1\administrator is a placeholder for the user name that has sufficient permissions.
      • Registry entry: SMTPSendPassword
        Type: String

        Note To obtain the value for this registry entry, follow these steps:
        1. Locate the following folder on the Microsoft Dynamics CRM CD:
          Drive:\Pfiles\MSCRM\Tool
          Note Drive is a placeholder for the hard disk drive in which you put the Microsoft Dynamics CRM CD.
        2. Type the following command at the command prompt, and then press ENTER:
          Microsoft.Crm.Tools.EncryptPwd.exe Mypassword > output.txt
          Note Mypassword is a placeholder for the actual user password.
        3. Copy the contents of the output.txt file into the SMTPSendPassword registry entry.
      • Registry entry: SMTPUseSSL
        Type: DWORD
        Value: 0
  6. Click Start, click Run, type iisreset, and then click OK.
  7. Try to send an e-mail message in Microsoft Dynamics CRM.

References


For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

906471 How to change the incoming or outgoing Microsoft Exchange Server settings after the original installation of Microsoft Dynamics CRM is completed

916925 Error messages when you send an e-mail message from the Microsoft CRM Web client: "Invalid Visibility Modification Access" and "Invalid Association: The request association is not valid"

913769 Error message when you try to send e-mail messages in Microsoft Dynamics CRM from the Microsoft CRM Web client to recipients in a different domain: "Failed to Initialize Token"