2011-02-26 73 views
0

我收到此错误:SQL Server 2005中xp_sendmail的错误

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.

我能做些什么?

回答

1

如果您正在运行SQL Server 2005,请改为使用sp_send_dbmail。 xp_sendmail的是SQL Server过时的2005 对于sp_send_dbmail,到这里看看:http://msdn.microsoft.com/en-us/library/ms190307%28v=SQL.90%29.aspx

更多关于数据库邮件,看这里: http://msdn.microsoft.com/en-us/library/ms175887%28v=SQL.90%29.aspx

的一点是,xp_sendmail的可能在SQL的未来版本中删除服务器。

+0

谢谢。我已经解决了使用sp_send_dbmail – esquare 2011-02-26 10:23:54

0

xp_sendmail函数需要在SQL Server计算机上安装Outlook。当您发送电子邮件时,它将在服务器上启动Outlook,并使用COM指示它发送邮件。像所有Office COM接口一样,它们有时在实验室环境中工作。但是在生产过程中,它会保证在最不幸的时候发生故障或崩溃,使服务器处于永久的状态。有关更多SQL Mail问题,请参阅此KB article

尝试使用xp_smtp_sendmail或查看此KB article其他替代方法。

+0

它返回“无法找到存储过程'xp_smtp_sendmail'”。 – esquare 2011-02-26 09:57:56

+0

@bedreddin:是的,如果你按照链接,它会告诉你如何安装它。你正在使用哪种SQL Server版本? – Andomar 2011-02-26 09:59:40

+0

我正在使用MSSQL 2005 – esquare 2011-02-26 10:06:10