fixing bugs with php email for production