Is there any way to force a package to fail from a Send Mail Task? We have a package whose last step is to send a failure message using the Send Mail Task if certain criteria are met. Usually, we create another Script Task directly after the Mail Task which just fails the package using code:
Dts.TaskResult = Dts.Results.Failure
Is there a way to eliminate the Script Task and fail the package directly from the Send Mail Task?
I had a similar scenario, instead of using the send mail task I decided to send email from the script task. That’s the only way I found to combine sending an email and failing the package into one step.