Ivan - dev3 deploy implementation fixes
This commit is contained in:
parent
c86d04e0cd
commit
f8b27f98c6
|
@ -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'
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue