Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
859 B

  1. SET QUOTED_IDENTIFIER ON
  2. GO
  3. SET ANSI_NULLS ON
  4. GO
  5. CREATE PROCEDURE sp_SendMailForBucket
  6. @Bucket varchar(100)
  7. AS
  8. BEGIN
  9. DECLARE @MailTo varchar(50)
  10. DECLARE @Mesg varchar(1000)
  11. DECLARE @Subj varchar(50)
  12. SET @MailTo = ''
  13. SET @Subj = 'You have been assigned a new bucket'
  14. SET @Mesg = 'Click on http://dbgdumps/cr/crashinstances.asp?bucketid=' + @Bucket
  15. -- Send mail to person following up on given Bucket
  16. SELECT @MailTo = Followup FROM CrashBuckets
  17. WHERE BucketId = @Bucket
  18. IF @MailTo <> ''
  19. BEGIN
  20. EXEC master.dbo.xp_startmail
  21. EXEC master.dbo.xp_sendmail @recipients = @MailTo,
  22. @message = @Mesg,
  23. @subject = @Subj
  24. EXEC master.dbo.xp_stopmail
  25. END
  26. ELSE
  27. BEGIN
  28. SELECT 'Could not send mail - bucket not found'
  29. END
  30. END
  31. GO
  32. SET QUOTED_IDENTIFIER OFF
  33. GO
  34. SET ANSI_NULLS ON
  35. GO