Fixed sending mails in frontend.