Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 sql2005 xp_sendmail

Author  Topic 

pssheba
Yak Posting Veteran

95 Posts

Posted - 2008-01-22 : 12:03:46
Hi everyone,
I wonder if i could get help concerning sending mail from sql server 2005 using master.xp_sendmail procedure.
My code is
EXEC master..xp_sendmail @recipients = 'name@mailaddress.com',
@message = '111',
@subject = '222'

and the error message i get is:
quote:
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

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-01-22 : 12:30:52
xp_sendmail is obsolete in sql server 2005. use database mail instead.

and xp_sendmail doesn't even have a parameter @user, but as far as i
remember this indicates that your SQL Mail isn't configured proeprly.

a google search on the error will probably return a few results on this.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out
Go to Top of Page

pssheba
Yak Posting Veteran

95 Posts

Posted - 2008-01-22 : 12:52:31
quote:
Originally posted by spirit1

xp_sendmail is obsolete in sql server 2005. use database mail instead.

and xp_sendmail doesn't even have a parameter @user, but as far as i
remember this indicates that your SQL Mail isn't configured proeprly.

a google search on the error will probably return a few results on this.
thanks,
can you indicate how it is done via database ? i'll be grateful

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out

Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-01-22 : 12:57:28
http://msdn2.microsoft.com/en-us/library/ms175887.aspx

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out
Go to Top of Page

pssheba
Yak Posting Veteran

95 Posts

Posted - 2008-01-22 : 13:04:47
thank a lot. hopefully that works on evaluation version.
Go to Top of Page
   

- Advertisement -