Fixed sending mail issue