Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Location
    Montreal, Canada
    Posts
    151

    Unanswered: passing @parameters and TEXT to xp_sendmail message!!

    How do you pass parameters and text to the message area... i know how to pass parameters or pass text how do i do both... for example.


    Exec master.dbo.xp_sendmail @recipients = 'johndoe' @message = 'hello and @number'


    PLZ HELP!!!!!!

  2. #2
    Join Date
    Dec 2003
    Posts
    454
    DECLARE @strSQL varchar(8000)

    SELECT @strSQL = 'master.dbo.xp_sendmail @recipients = ''johndoe'' @message = ''hello and ' + @number + ''''

    EXECUTE(@strSQL)

Posting Permissions

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