?
Solved

Xp_sendmail error

Posted on 2008-10-30
1
Medium Priority
?
722 Views
Last Modified: 2008-11-03
Hello,

I am trying to use xp_sendmail to send out an email. Upon executing the procedure that contains the sendmail code i receive an error that says "xp_sendmail: Procedure expects parameter @user, which was not supplied." However after attempting to define the @user parameter an error stating "xp_sendmail: Invalid parameter '@user'" I believe the MS page tells me to leave the @user parameter off. How can i successfully and correctly send email from with a stored procedure using ms sql server 2005? Sample code attached
EXEC master.dbo.xp_sendmail 
    @recipients=N'emailaddress@anywhere.anything',
    @message=N'some text.'

Open in new window

0
Comment
Question by:bnrtech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
bcsql earned 2000 total points
ID: 22845132
xp_sendmail is the old sql mail from sql 2000. Database mail is for sql 2005 setup database mail and us sp_send_dbmail. The error you are getting usually refers to the SQL mail is not setup or running correctly you can try xp_stopmail and xp_startmail. The outlook profile has to be setup for sqlmail also. The error is not very good as there is no @user in xp_sendmail.


http://msdn.microsoft.com/en-us/library/ms175887(SQL.90).aspx

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question