got proper communication between send email xhr & api