Send Error Email with Error Code, Error Description by using Send Mail Task in SSIS Package - SQL Server Integration Services(SSIS) Tutorial


We have created an SSIS Package, that fails sometime. The only way to find out if the Package is failed to check SQL Server Job history or alerts generated by SQL Server Agent Job. We want to include components in SSIS Package so we can send an Email from SSIS Package with Error Information when the Package fail.


In this video we will find out the solution for above scenario, we will learn below items in this Video
How to create SSIS Package Parameters 
How to use Event Handlers in SSIS Package for OnError Events
How to Create error in SSIS Package for Test Purpose
How to use Send Mail Task in Event Handler to send email with Error Code, Error Description etc.

Expressions used in the Send Mail Task MessageSource

" Hi Team
The Package "+ @[System::PackageName] + " has failed in "+ @[$Package::Environment]+" with below error
Error Code: "+ (DT_WSTR,50)@[System::ErrorCode]+"
Error Description: "+ @[System::ErrorDescription] +"
Error Source: "+ @[System::SourceName]+"

Please contact SSIS Team if have any questions
Thank you
Tech Brothers"


  1. Their staff is personable both on the phone and in-person. Everyone has a positive, can-do attitude

  2. Their congenial, thoughtful approach to customer service informs both a Best Podcast Microphone for iPhones and their top-notch deliverables.

  3. Discover the pinnacle of email design with Stripo! Elevate your brand's digital presence with our exclusive collection of outlook email template design. Engage your audience like never before with sleek layouts and customizable elements that ensure your message stands out. Whether you're promoting products or sharing updates, our templates are crafted to maximize impact and deliver results. Join the ranks of savvy marketers who rely on Stripo for innovative solutions. Explore our outlook email template design today and transform your campaigns into captivating experiences. Start creating emails that leave a lasting impression!