Added the ability to throw exceptions on mail send failure.