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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql 2005 xp_sendmail, error message 1

Status
Not open for further replies.

henin

MIS
Oct 30, 2007
35
IL
Hi everyone,
I wonder if i could get help concerning sending mail from sql server 2005 using master.xp_sendmail procedure.
My code is
Code:
EXEC master..xp_sendmail @recipients = 'name@mailaddress.com',
@message = '111',
@subject = '222'
and the error message i get is:
Msg 17985, Level 16, State 1, Line 0
xp_sendmail: Procedure expects parameter @user, which was not supplied.
Any idea why this is happening to me ?
Thanks
 
That's very strange. Any reason that you aren't using sp_send_dbmail instead of xp_sendmail? xp_sendmail is going to be removed at some point in the near future.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Thanks, never heard of it but i'll try to find out how it works.
 
sp_send_dbmail is the procedure which database mail uses to send mail. Database mail is the replacement for SQL mail which is where the xp_sendmail procedure came from.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
I tried it but a @profile argument is required and this is above my ability. should i install exchange sever for that ?! it seems i'd rather stay with the good old xp_sendmail then get myself involved with mail server problems.
 
You have to setup a profile in the database mail. You can use the sysmail_help_profile_sp procedure to get a list of available profiles on the system.

Getting Exchange setup and working is much harder than getting database mail setup.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top