Solved

Xp_sendmail error

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

733 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