xp_sendmail: Procedure expects parameter @user

  • I'm running SQL 2000 and am trying to port over my useful stored procedures from a previous job.  In the past, I used xp_sendmail without any big hassle.

    Here, I've already set up an Outlook 2000 mail account and logged into that server with that account name.  The test command I used from master was

    xp_sendmail @recipient = 'me@mycompany.com'

      , @message = 'body message'

      , @subject = 'sql mail test subject'

    I get the error

    "Server: Msg 17985, Level 16,State 1, Line 0

    xp_sendmail: Procedure expects parameter @user, which was not supplied". 

    I tried looking through BOL and the knowledgebase (article 263556), but have had no success.  Any suggestions are appreciated.

  • This was removed by the editor as SPAM

  • Well, I can say you that I have no problem executing it.

    What I can see in your post is that you entered: "@recipient = 'me@mycompany.com'" and must be "@recipients = 'me@mycompany.com'" (watch the S)

    I've tryed to add the @user param in the query and "xp_sendmail: Invalid parameter '@user'" error raised.

    This is my exact query (wich works fine):

    EXEC master.dbo.xp_sendmail

    @recipients = 'me@mymail.com',

    @message = 'test',

    @subject = 'test'

    I think this is all that can say you

  • Your statement is true.  It was a typo on my part.  My code does include the @recipients parameter as you indicated. 

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply