Results 1 to 4 of 4

Thread: xp_sendmail

  1. #1
    Join Date
    Nov 2003
    Location
    Vetlanda, Sweden
    Posts
    2

    Question Unanswered: xp_sendmail

    Hi everyone,

    I want to use the stored procedure xp_sendmail but in some cases I don't want to have a @Query, just send a mail.
    But if I omit the parameter @query (as I thought I could) I get this message:
    xp_sendmail expects parameter @query, which was not supplied.

    My executionline looks something like this:
    exec master.dbo.xp_sendmail @RECIPIENTS= 'Firstname.Lastname@company.se',@Message='Some message here..',@NO_HEADER = 'TRUE', @subject = 'My subject'

    Please Help, someone nice person out there...

    Regards Cathrine from Sweden

  2. #2
    Join Date
    Oct 2003
    Location
    Ireland
    Posts
    54
    What about this ?

    exec master.dbo.xp_sendmail
    @QUERY='select "" ' ,
    @RECIPIENTS= 'Firstname.Lastname@company.se',@Message='Some message here..',@NO_HEADER = 'TRUE', @subject = 'My subject'

  3. #3
    Join Date
    Nov 2003
    Location
    Vetlanda, Sweden
    Posts
    2
    .. then I get this error

    Cannot use empty object or column names. Use a single space if necessary.

    Tried with a single space as well and then I get:
    Invalid column name ' '.

  4. #4
    Join Date
    Oct 2003
    Location
    Ireland
    Posts
    54
    Ah ok, sorry it works on SQL 7, but no on SQL 2000 when I tried it.
    Back to the drawing board.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •