19 June 2008 07:56
ssqa.net
SQL Server 2005 xp_sendmail: 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.
Usage of SQL Mail is quite common within SQL Server environment, recently I have involved at one of the client's site with the error:
Msg 17930, Level 16, State 1, Line 0
xp_sendmail: 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.
Further details on the issue the server (Windows 2003) has been upgraded from SQL Server 2000 to 2005, no issues reported on database side except on the alert side of sending the emails for failed jobs. The first question I have asked them is that why not use Database Mail instead of SQLMail as DBMail qualities include (as per BOL):
- No Microsoft Outlook or Extended Messaging Application Programming Interface (Extended MAPI) requirement. Database Mail uses the standard Simple Mail Transfer Protocol (SMTP) to send mail. You can use Database Mail without installing an Extended MAPI client on the computer that runs SQL Server.
- Process isolation. To minimize the impact on SQL Server, the component that delivers e-mail runs outside of SQL Server, in a separate process. SQL Server will continue to queue e-mail messages even if the external process stops or fails. The queued messages will be sent once the outside process or SMTP server comes online.
- Failover accounts. A Database Mail profile allows you to specify more than one SMTP server. Should an SMTP server be unavailable, mail can still be delivered to another SMTP server.
- Cluster support. Database Mail is cluster-aware and is fully supported on a cluster.
Due to the legacy application that was used here will have only use SQLMail, so thats the story to keep with this mailing solution until it is re-written to use Database Mail. So as per the pre-requisite for SQLMail they have installed Outlook 2000 with service pack3 and default mail is outlook with relevant mapi profiles existence. As usual search under Knowledge Base articles referred the links such as:
How to configure SQL Mail to use an Internet mail server by using Outlook 2003
How to configure SQL Mail
Common SQL Mail problems
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.
For further information on what kind of issues you might get even if you use Outlook 2000 review the remaining text on the above KB article, finally I was able to resolve the issue by adding C:\Program Files\Common Files\System\Mapi\1033\NT to the PATH variable under Start --> Control Panel --> System, under Advanced Properties and choose Environment Variables then search for PATH variable (to Edit). The root cause of this issue due to the fact that SQLMail is the legacy component in SQL Server 2005 version and the profile for mail needs the SQLAgent to activate.
Filed under: sql server, sqlagent, mapi, profile, database mail, sqlmail, kba