Hi everyone,
using sp_send_dbmail , for the @recipients parameter i tried a query as follows:
i didnt get any error message but the mails didnt arrive...
any idea why ?
thanks
using sp_send_dbmail , for the @recipients parameter i tried a query as follows:
Code:
DECLARE @mailist VARCHAR(2000)
SET @mailist=
'
select email
from
server.db.dbo.table
where
lastname=' + '''' + 'aaa' + ''''
exec msdb.dbo.sp_send_dbmail
@profile_name='my_profile',
@recipients=@mailist,
@...
any idea why ?
thanks