Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL 2005 SendMail

Status
Not open for further replies.

londontown1

Technical User
Nov 3, 2008
4
GB
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
 
Hi,

If you're using SQL2K5 I suggest you use DBMail instead of SQL Mail. With DBMail there is no MS Outlook or Extended MAPI requirements.

If for whatever reason you need to continue using SQL Mail, then check this link How to set up SQL Mail

Ryan
 
Thanks for the reply, I ahve now configured DBMail and it is working well.

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top