Moved sending email into a seperate thread to avoid locking up the program on slow networks