Hi all, I want to take this alert script....

-- Script generated on 1/19/2005 2:14 PM
-- By: MAMSI\sa-sql
-- Server: (local)

IF (EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name = N'Demo: Full msdb log'))
---- Delete the alert with the same name.
EXECUTE msdb.dbo.sp_delete_alert @name = N'Demo: Full msdb log'
BEGIN
EXECUTE msdb.dbo.sp_add_alert @name = N'Demo: Full msdb log', @message_id = 9002, @severity = 0, @enabled = 1, @delay_between_responses = 10, @include_event_description_in = 5, @database_name = N'msdb', @category_name = N'[Uncategorized]'

EXECUTE msdb.dbo.sp_add_notification @alert_name = N'Demo: Full msdb log', @operator_name = N'Lystra Williams', @notification_method = 1

END


and instead of using the last line of code:EXECUTE msdb.dbo.sp_add_notification @alert_name = N'Demo: Full msdb log', @operator_name = N'Lystra Williams', @notification_method = 1

I would like to add the below code:

exec master.dbo.sp_sqlsmtpmail
@vcTo = 'lwilliams@uhc.com',
@vcBody = msdb log is full,
@vcSubject = 'SQL02FDK - Full msdb log'


I only want to generate this email only if the log is indeed full.

First of all is this task possible and if so how can it be done?

Thanks

Lystra