 <?php
   include_once("system.php");
   include_once("_framework/_nemo.api.cls.php");

   //send password reset email
   include_once("_framework/_nemo.email.cls.php");

   ## ADD RECORD TO RESET PASSWORD TABLE
   $nemoEmail = new NemoEmail("maanie@overdrive.co.za", "" , 0);
   $nemoEmail->LoadEmailTemplate("Reset Password");

   $arrValues[DisplayName] = "Maanie Test API";
   //$arrValues[Link] = "<a href='".$SystemSettings[BASE_URL]."/resetPassword.php?email=". $xdb->qs($args["Username"])."&resetKey=$np->hash'>Reset Password</a>";
   $arrValues[Link] = "<a href='". $SystemSettings[BASE_URL_S3]. "/resetPassword.php?strEmail=". $args["Username"]."&ResetKey=$np->hash'>Reset Password</a>";
   $nemoEmail->Substitute($arrValues);

   $nemoEmail->addHeader("FROM", "SAWIS Online <info@sawis.co.za>");
   //$nemoEmail->Bcc = $SystemSettings["SMTP BCC"];
   $nemoEmail->From = "SAWIS Online <info@sawis.co.za>";

   //$nemoEmail->Send();

   if($nemoEmail->Send())
   {
      echo "Email Sent, " . $retVal;
   } 
   else 
   {
      echo "SENDING FAILED";
   }


?>