function ajaxsendpasswordAction() { if (!($sport = new FM_Components_Sports(array('id' => $_POST['orgId'])))) { print '0'; exit; } $user = new FM_Components_SportsUser(array('id' => $_POST['id'])); if ($user->getId()) { $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: ' . $sport->getName() . ' administrator @ 4Monmouth.com' . "\r\n" . 'Reply-To: nobody@4monmouth.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($user->getEmail(), 'Your username for ' . $sport->getName() . ' @ 4Monmouth.com', FM_Components_EmailFormatter::createPasswordLetter($user, $sport), $headers); print '1'; exit; } print '0'; exit; }