add some prompts when sendMail returns

This commit is contained in:
Luk 2024-01-29 20:43:46 +08:00
parent 2a4f962e1c
commit 159f90f44a

View File

@ -31,14 +31,14 @@ module.exports = {
} }
*/ */
if (result.messageId && result.response === '250 Ok') { if (result.messageId && result.response === '250 Ok') {
console.log(result) console.log('MSG_SENT_SUCCESS', result)
return { _state: 'MSG_SENT_SUCCESS' } return { _state: 'MSG_SENT_SUCCESS' }
} }
console.log(result) console.log('MSG_SEND_FAIL', result)
return { _state: 'MSG_SEND_FAIL' } return { _state: 'MSG_SEND_FAIL' }
}) })
.catch((err) => { .catch((err) => {
console.log(err) console.log('SMS_SEND_ERROR', err)
return { _state: 'SMS_SEND_ERROR' } return { _state: 'SMS_SEND_ERROR' }
}) })
}, },