Made emailing an asynchronous task.
This way, a thread is invoked which does the email processing in the background and the browser refresh/redirect is not delayed.