Hi there
I want to pass a variable value to the xp_sendmail procedure such as the following:
EXEC xp_sendmail @recipients = @email,
@query = 'SELECT * from myTable inner join anotherTable on myTable.myColumn = anotherTable.anotherColumn',
@subject = 'Report',
@message = 'This is a test message:',
@dbuse = 'myDB'
but this gives me the following error message:
Server: Msg 17963, Level 16, State 1, Line 0
xp_sendmail: Procedure xp_sendmail expects parameter @recipients, which was not supplied.
Does anyone know how I can get past this?
Thanks in advance
I want to pass a variable value to the xp_sendmail procedure such as the following:
EXEC xp_sendmail @recipients = @email,
@query = 'SELECT * from myTable inner join anotherTable on myTable.myColumn = anotherTable.anotherColumn',
@subject = 'Report',
@message = 'This is a test message:',
@dbuse = 'myDB'
but this gives me the following error message:
Server: Msg 17963, Level 16, State 1, Line 0
xp_sendmail: Procedure xp_sendmail expects parameter @recipients, which was not supplied.
Does anyone know how I can get past this?
Thanks in advance