added a catch to sending emails to get a better stack trace