Open SabiulSabit opened 6 months ago
I am getting ENOENT alt1.gmail-smtp-in.l.google.com error while sending mail
It was working as expected but suddenly it stopped working and throwing the above error
jobs.module.ts
imports: [ MailerModule.forRoot({ transports, template: { dir: join(__dirname, 'mail-templates'), adapter: new HandlebarsAdapter(), options: { strict: true, }, }, }), ], ... }) export class JobsModule { }
transports object
security: { host: process.env.EMAIL_SMTP_HOST, secure: false, auth: { user: process.env.SECURITY_EMAIL, pass: process.env.SECURITY_EMAIL_PASSWORD, }, }, notifications: { host: process.env.EMAIL_SMTP_HOST, secure: false, auth: { user: process.env.NOTIFICATIONS_EMAIL, pass: process.env.NOTIFICATIONS_EMAIL_PASSWORD, }, }, support: { host: process.env.EMAIL_SMTP_HOST, secure: false, auth: { user: process.env.SUPPORT_EMAIL, pass: process.env.SUPPORT_EMAIL_PASSWORD, }, }, };
Mail Service
async sendMail() { try { this.mailerService.sendMail({ ...mailCofig }).catch(async err => { console.log('Error in mail sending', JSON.stringify(err)); console.trace(err); }); } catch (err) { console.log('Error while sending email', JSON.stringify(err)); console.trace(err); } }
I am also facing the same issue. Last few days trying to solve the issue but i didn't find any solution.
I am getting ENOENT alt1.gmail-smtp-in.l.google.com error while sending mail
It was working as expected but suddenly it stopped working and throwing the above error
jobs.module.ts
transports object
Mail Service