Microsoft KB Archive/897349

= How to configure SQL Mail to use an Internet mail server by using Outlook 2003 =

Article ID: 897349

Article Last Modified on 11/2/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Enterprise Edition
 * Microsoft SQL Server 2000 Personal Edition
 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 2000 Developer Edition

-





INTRODUCTION
In Microsoft SQL Server 2000, you can configure SQL Mail or SQL Agent Mail to use an Internet mail protocol such as Simple Mail Transfer Protocol (SMTP) or Post Office Protocol 3 (POP3). However, Microsoft Office Outlook 2003 must be running on the computer that is running SQL Server for you to send and receive e-mail messages. This article describes how to configure SQL Mail to use an Internet mail server by using Outlook 2003.



MORE INFORMATION
In Microsoft Outlook 2002 and in later versions, the MAPI spooler runs in process. Therefore, you must start Outlook 2003 so that SQL Mail can send and receive e-mail messages through an Internet mail server. If Outlook 2003 is not running, SQL Mail can only send and receive e-mail messages through a mail server that is running a version of Microsoft Exchange. When Outlook 2003 is not running, outgoing messages remain in the Outbox folder until you start Outlook 2003.

Outlook 2003 supports Exchange, SMTP, and POP3. Outlook 2002 and Outlook 2003 use a unified configuration. Outlook 2002 and Outlook 2003 do not provide separate configuration options for Corporate or Workgroup installation and for Internet Mail Only installation. Additionally, Outlook 2003 includes some security features to help protect against e-mail worms. These security features first appeared in the Outlook 2000 security update.

We do not recommend that you use Outlook 2002 or Outlook 2003 together with SQL Mail and with Internet mail servers that use SMTP or POP3.

Note We do not recommend the following procedure. You can use this procedure if you must send and receive e-mail messages in SQL Mail through an Internet mail server by using Outlook 2003.

To send and receive e-mail messages in SQL Mail through an Internet mail server by using Outlook 2003, follow these steps:
 * 1) Start Outlook 2003 on the computer that is running SQL Server.
 * 2) In SQL Server, start a SQL Mail mail session.

If you start a SQL Mail mail session before you start Outlook 2003, you cannot start Outlook 2003, and you receive the following error message:

Cannot start Microsoft Outlook. Unable to open the Outlook window. The set folders could not be opened. The server is not available. Contact your administrator if this condition persists.

In this situation, stop the SQL Mail mail session by using the xp_stopmail stored procedure, and then start Outlook 2003. All e-mail messages that you sent earlier are in the Inbox folder. These e-mail messages will be sent when you start Outlook 2003. If you open or read these e-mail messages, they will not be sent.

If you start Outlook 2003 before you start a SQL Mail mail session, you will not receive an error message, even if Outlook 2003 is open in the notification area.

If you cannot keep Outlook 2003 running, use one of the following methods to send and receive e-mail messages:  Use a computer that is running Exchange instead of using an Internet mail server. You do not have to start Outlook 2003 to send and receive e-mail messages through a computer that is running Exchange. Use Microsoft Outlook 2000 Service Pack 3 (SP3). Because the MAPI spooler runs out of process in Outlook 2000 SP3, you do not have to start Outlook 2000 to send and receive e-mail messages through SQL Mail in SQL Server.

For more information about how to download and install Outlook 2000 Service Pack 3, click the following article number to view the article in the Microsoft Knowledge Base:

326585 Description of the Office 2000 Service Pack 3



Note The recommendations that are mentioned in this article also apply to SQL Server 2005. With SQL Server 2005, if you want to use SMTP and POP3 servers to send and receive e-mail messages, the best option would be to move to Database mail because it integrates with them very smoothly. If we still want to use the Legacy SQLMail component in SQL Server 2005 with SMTP/POP3 configuration, you cannot move to Database mail. In this case, use Outlook 2000 with Service Pack 3 (SP3) installed. We do not recommend that you use Outlook 2003 with SQL Server 2005 because of the reasons mentioned in this article. However, even if you use Outlook 2000 with SP3, you can encounter the following issue. When you right-click SQLMail in SQL Server Management Studio (SSMS), you receive the following error message:

xp_get_mapi_profiles fails with the following error: Msg 17930, Level 16, State 1, Line 0

xp_get_mapi_profiles: Either there is no default mail client or the current mail client cannot fulfill the messaging request. Please run Microsoft Outlook and set it as the default mail client

To resolve this issue, add C:\Program Files\Common Files\System\Mapi\1033\NT\ on the PATH environment variable.

