March 27, 2008 at 10:38 am
exec sp_smtp_sendmail @FROM=myname@mycompany.org',
@FROM_NAME='SQLLAB02',
@TO=myname@mycompany.org,
@subject='Email notifications for failed jobs',
@message='email notifications for failed SQL Server jobs',
@server='123.16.4.47'
I am using the above code as a second step on my maintenance jobs to so email notifications when the job fails. I can't for the life of me figure out how to add a second email address???
I'd like the email to go to both sql server dbas but I can't figure out the syntax. can anyone help?
March 27, 2008 at 11:39 am
Jpotucek (3/27/2008)
I am using the above code as a second step on my maintenance jobs to so email notifications when the job fails. I can't for the life of me figure out how to add a second email address???
Use a semicolon between the addresses. Looks like a couple parameters are missing single quotes too.
ex.
@TO='user1@mycompany.org;user2@mycompany.org'
March 27, 2008 at 12:18 pm
Thank you both very much
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply