fixed sending mail issues