Send Email with Attachments
Last updated
Last updated
To be able to send emails with files you must import MailersModules
in the module where you want to use it.
This module is only configured to send PDF files, if you want to send other file types you can create a new function via the formatPDFAttachment
function in src/mailers/mailer.utils.ts
so it can accept different file types.
recipientEmails: Email or Emails to which you want to send the information.
emailsSubject: Title you want to display in the email.
emailText: Content you want to display in the body of the email.
emailHtmlBody: Content you want to display in the body of the email.
Attachements.content: File you want to send. (This file must be in base64)
Attachements.filename: Name of the file to be attached.