fixing cross origin issues in sending mails