Ivan - Fix email sender issues [skip ci]
This commit is contained in:
parent
94743f58ee
commit
2a5fbae490
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue