From = EMAIL; $mail->AddAddress($r_email); $mail->Subject = SITE_NAME . ': ' . _AT('password_reminder'); $mail->Body = $tmp_message; if(!$mail->Send()) { //echo 'There was an error sending the message'; $msg->printErrors('SENDING_ERROR'); exit; } $msg->addFeedback('PASSWORD_SUCCESS'); unset($mail); $success = true; } else { $msg->addError('EMAIL_NOT_FOUND'); } } /*****************************/ /* template starts down here */ if ($errors || !$success) { $onload = 'document.form.form_email.focus();'; $savant->display('password_reminder.tmpl.php'); } else { $savant->display('password_reminder_feedback.tmpl.php'); } ?>