Fix email sent multiple times, and put reply mail in the modal dialog