Fix problem while sending mail