From 9cff3cd9ae4f14f90857ea68a87c7c0e1dbf10f4 Mon Sep 17 00:00:00 2001 From: GotPPay Date: Fri, 19 Jan 2018 19:28:46 +0100 Subject: [PATCH] change email service --- backend/helpers/email.js | 10 +++++----- backend/models/alexa.js | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/backend/helpers/email.js b/backend/helpers/email.js index 575b75c..3f92a1c 100644 --- a/backend/helpers/email.js +++ b/backend/helpers/email.js @@ -29,12 +29,12 @@ module.exports = { message; let transporter = nodemailer.createTransport ({ - host: 'smtp.yandex.com', - port: 465, - secure: true, + host: 'smtp.mail.com', + port: 587, + secure: false, auth: { - user: 'saburly@yandex.com', - pass: 'WeAreSaburlyTeam', + user: 'saburly@mail.com', + pass: 'KeepSaburly', }, }); diff --git a/backend/models/alexa.js b/backend/models/alexa.js index 25c80ac..271eb77 100644 --- a/backend/models/alexa.js +++ b/backend/models/alexa.js @@ -127,15 +127,18 @@ module.exports = { intent.slots.Message.value, destinationEmail ).then(info=>{ + console.log(info); this.response.speak ( 'Ok. Message sent. Someone will contact you ASAP' ); + this.emit (':responseReady'); }).catch(error=>{ + console.log(error); this.response.speak ( 'Sorry, there was a problem with sending message.' ); + this.emit (':responseReady'); }); - this.emit (':responseReady'); } };