fix timeouts and socket errors via threading the email sending and moving timeout option