fixed the mutex and sending email problem...kinda