Ivan - dev3 deploy implementation fixes

This commit is contained in:
ivan 2016-09-22 20:33:45 -03:00
parent c86d04e0cd
commit f8b27f98c6
2 changed files with 24 additions and 8 deletions

View File

@ -14,15 +14,24 @@ function processData (data) {
module.exports = {
call: function ({path, data}) {
return new Promise(function (resolve, reject) {
APIUtils.post(root + path, processData(data)).then(function (result) {
console.log(result);
APIUtils.post(root + path, processData(data))
.then(function (result) {
console.log(result);
if (result.status === 'success') {
resolve(result);
} else if (reject) {
reject(result);
}
});
if (result.status === 'success') {
resolve(result);
} else if (reject) {
reject(result);
}
})
.catch(function (result) {
console.log('INVALID REQUEST');
console.log(result);
reject({
status: 'fail',
message: 'Internal server error'
});
});
});
}
};

View File

@ -34,6 +34,13 @@ class MailSender {
$mailer->Username = $this->mailOptions['smtp-user'];
$mailer->Password = $this->mailOptions['smtp-pass'];
$mailer->Timeout = 1000;
$mailer->SMTPOptions = [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
]
];
if ($mailer->smtpConnect()) {
$mailer->send();