Solved

Xp_sendmail error

Posted on 2008-10-30
1
720 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 500 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

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

Question has a verified solution.

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

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
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…

717 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