improved mail notification on build exit