In this article, we are going to implement NestJS sending emails with file attachments. Part-1 NestJS Send Plain Text Email Part-2 NestJS Send Dynamic Generated HTML Template As Email Install @types/nodemailer Package: Let's install the typescript nodemailer package. npm install --save-dev @types/nodemailer Endpoint To Send Email With File Attachment: Let's add a sample image file into the 'mail' folder that we are going to attach to the email. Let's create an endpoint to send the email with a file attachment. src/email.controller.cs: import { join } from 'path'; @Get('file-attachment') async fileAttachement(@Query('toemail') toemail){ var response = await this.mailService.sendMail({ to: toemail, from: 'nani.bommidi93@gmail.com', subject: 'File Attachment', html: "<h1>File Attachment</h1>", attachments:[{ path: join(__dirname,'mails','