Troubleshooting SQL Mail with Exchange Server

Typically, errors in starting a SQL Mail session or sending mail from SQL Mail with Microsoft® Exchange Server fall into two categories: permissions problems and Exchange client setup problems. For more information about SQL Mail, see SQL Mail.

Examine this list of items, in this order:

  1. Log on to Microsoft Windows NT® with the user account that will be used for the MSSQLServer service. This user account must be an administrator of the local computer and a domain account.
  2. Confirm that the Exchange Server client, Exchnge32.exe, or the Microsoft Outlook™ client, Outlook.exe, can connect to Exchange Server and that e-mail can be sent.
  3. Confirm that the Exchange Server profile used does not have a Personal Message Store (.pst).
  4. On the Services tab, confirm that the only services available are Microsoft Exchange Server and Personal Address Book, and then click the Delivery tab. Confirm that the selection in the Deliver To box is the mailbox on Exchange Server, which should have a name similar to “Mailbox - <Friendly User Name>“ (where <Friendly User Name> is the name of the user who logged on to Windows NT in Step 1).
  5. To run SQL Mail with Exchange Server, the MSSQLServer service must be run under the same user account that logged on in Step 1. In Control Panel, double-click Services, select the MSSQLServer service, and then click Startup.
  6. Confirm that the SQL Mail profile is correct. In SQL Server Enterprise Manager, expand the server, expand the Support Services folder, select SQL Mail, and then right-click. Click Properties, and then on the General tab, ensure that the profile name specified in the Profile name box is correct. If needed, click Test. The profile name must match the profile name used in Step 3.
  7. Test Microsoft® SQL Server™ access permissions to Exchange Server by executing xp_cmdshell, which executes with the same permissions as SQL Mail. Use this command to test connectivity to the server, assuming Exchange Server is located on a computer named "NTServer".

    xp_cmdshell "NET USE \\NTServer\IPC$"

      

    If this command fails, Step 3 was not completed correctly.

It should now be possible either to start SQL Mail automatically or to start SQL Mail manually using xp_startmail. When using xp_startmail, the profile can be replaced by replacing <Profile name> below with the profile name used in Step 3:

xp_startmail '<Profile name>',''

  

See Also
MAPI Error Messages xp_startmail
xp_cmdshell  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.