Sendgrid Email SMTP

master
Krisna Yana Javista 2 years ago
parent a33dd0c8b7
commit 7a07327503

@ -42,7 +42,7 @@ amqp.connect(process.env.AMQP_SERVER).then(async conn => {
} }
if (queuePaylaterExist) { if (queuePaylaterExist) {
queuePaylaterExist.then(() => { queuePaylaterExist.then(() => {
return ch.consume(queueNota, async (msg) => { return ch.consume(queuePaylater, async (msg) => {
var messageBody = JSON.parse(msg.content.toString()) var messageBody = JSON.parse(msg.content.toString())
console.log(`[*PayLater] Message Received! email : ${messageBody.email}`) console.log(`[*PayLater] Message Received! email : ${messageBody.email}`)
sendReceipt({ sendReceipt({
@ -52,7 +52,7 @@ amqp.connect(process.env.AMQP_SERVER).then(async conn => {
}) })
}, { noAck: true }) }, { noAck: true })
}).then(() => { }).then(() => {
console.log('* Waiting for messages from queue ' + queueNota) console.log('* Waiting for messages from queue ' + queuePaylater)
}) })
} }
}).catch(console.warn) }).catch(console.warn)

Loading…
Cancel
Save