November 3, 2008 at 2:01 am
Hello all,
MS SQL 2005
I would like to email the results of a SP, i am using the following code:
exec master.dbo.xp_sendmail
@recipients='salesgroup.one@firstgroup.co.uk'
,@subject ='Dealbook Daily Commissions'
,@query='
exec salesfigures.dbo.Admin_procSalesReport'
,@width=140
,@no_header='true'
GO
exec master.dbo.xp_stopmail
GO
I am getting the following 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.
Any suggestions? Much appreciated
November 3, 2008 at 10:00 am
Is outlook configured on the server for the account that the SQL Server service runs under?
more information available here: http://support.microsoft.com/default.aspx/kb/263556
Since you are using SQL 2005 - why don't you switch to DatabaseMail?
Information on how to convert procs using xp_sendmail to use sp_send_dbmail:
November 4, 2008 at 7:16 am
By Default SQL Mail is not enabled in SQL Server2005 and xp_SendMail uses SQL Mail. You will have to enable it before using it.
It is recommended to use Database Mail instead of SQL mail in SQL Server 2005 so you should try using Database Mail.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply