Get Failure/Error notification by email from Event Handler

  • Go to event handler, choose OnError
  • Drag a Send Mail Task.
  • Configure SmtpConnection and other details except MessageSource
  • Go to Expressions tab and then expand this, then click on browse button this will open Expressions designer
  • Choose MessageSource under Property window and then again
  • Click on browse button this will open the second editor, the Expression Builder.
  • Then substitute values in Expression window like below
"XYZ Job Failed"+"!"+"\n"+"Error Details:"+"\n"+"On Server – "+ @[System::MachineName]+"\n\n"+"Package Name –"+@[System::PackageName]+".dtsx" +"\n\n"+"Task Name(Task where job failed ) – "+ @[System::SourceName]+"\n\n"+"Task Type(SSIS Component) – "+@[System::SourceDescription]+"\n\n"+ "Error Description -"+@[System::ErrorDescription]+"\n\n"+ "Error Code – "+(DT_WSTR, 12) @[System::ErrorCode]+"\n\n"


  • Click on Evaluate Expression to check for any errors!

See Also