Fix issue with email sending under MySQL