Mail not sent on Production without error / info
sluxzer opened this issue · 0 comments
sluxzer commented
Describe the bug
We have this simple script to send an email notification
async sendUserQuestion(parameter: createUserQuestionDto) {
const result = this.mailerService.sendMail({
to: process.env.ACCOUNT_EMAIL,
from: parameter.emailFrom,
subject: `[Contact Us] Question From ${parameter.name} (${parameter.emailFrom})`,
template: 'question.template.pug',
context: {
name: parameter.name,
question: parameter.question,
},
})
.then(() => {
console.log('Success');
})
.catch(() => {
console.log('gagal');
});
return result;
}
It works locally, but when in production it's stopped on the "connection established", without further output error/anything, even the promise and catch not called.
To Reproduce
Steps to reproduce the behavior:
- Run the code
Expected behavior
the email is sent, or showing output promise or catch, here is the output from local
Desktop (please complete the following information):
- OS: Ubuntu
- Browser: -
- Version: 22