a few fixes on email send