This will throw an error if we can't connect to the smtp server for some reason resulting in a server 500. It would be good to catch this and give some nicer feedback to the user.