January 21, 2011 at 5:52 am
Hi there,
Just a small bit of help...
Trying to get my head round sending an sp to multiple emails. I currently have this but obviously it's not qute right....
exec msdb.dbo.sp_send_dbmail
@profile_name=[Public Profile],
@recipients='email1@workplace.co.uk';'email2@workplace.co.uk';'email3@workplace.co.uk',
@subject = 'Total Open Calls',
@query = "query",
@attach_query_result_as_file = 1,
@query_attachment_filename ='QueryResults.txt'
Thanks as I am sure this is an easy one. My brain is clearly mush right now....
January 21, 2011 at 6:00 am
from memory you quote the entire list, not each email address;
exec msdb.dbo.sp_send_dbmail
@profile_name=[Public Profile],
@recipients='email1@workplace.co.uk;email2@workplace.co.uk;email3@workplace.co.uk',
@subject = 'Total Open Calls',
@query = "query",
@attach_query_result_as_file = 1,
@query_attachment_filename ='QueryResults.txt'
January 21, 2011 at 7:35 am
It's a dumb day for me...thank you worked perfectly!
January 21, 2011 at 7:48 am
Nobadys' is perfect you learn it from your silly mistakes :-D.
Abhijit - http://abhijitmore.wordpress.com
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply