Solved

Xp_sendmail error

Posted on 2008-10-30
1
714 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
1 Comment
 
LVL 6

Accepted Solution

by:
bcsql earned 500 total points
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now