Ivan - Fix email sender issues [skip ci]

This commit is contained in:
ivan 2016-07-08 18:00:52 -03:00
parent 94743f58ee
commit 2a5fbae490
3 changed files with 5 additions and 5 deletions

View File

@ -9,11 +9,11 @@ class SignUpController extends Controller {
public function handler() {
$this->requestUserData();
$userId = $this->createNewUserAndRetrieveId($email, $password);
$userId = $this->createNewUserAndRetrieveId($this->email, $this->password);
Response::respondSuccess(array(
'userId' => $userId,
'userEmail' => $email
'userEmail' => $this->email
));
EmailSender::validRegister($this->email);

View File

@ -14,6 +14,7 @@ $app = new \Slim\Slim();
include_once 'libs/Controller.php';
include_once 'libs/ControllerGroup.php';
include_once 'libs/Hashing.php';
include_once 'libs/EmailSender.php';
// LOAD MODELS
spl_autoload_register(function ($class) {

View File

@ -2,10 +2,9 @@
class EmailSender {
public static function validRegister($mail) {
$newMail = new PHPMailer;
$mail->From = "Admin@opensupports.com";
$mail->From = "admin@opensupports.com";
$newMail->addAddress($mail);
@ -13,7 +12,7 @@ class EmailSender {
if(!$newMail->send())
{
echo "Mailer Error: " . $newMail->ErrorInfo;
Response::respondError("Mailer Error: " . $newMail->ErrorInfo);
}
else
{