Fixed a bug in emailSend