@spalx/email-delivery-pkg
v1.1.3
Published
Instance of `EmailDeliveryService` used for sending emails.<br> Since this service implements the IAppPkg interface, the recommended way of using it is by registering it in your app initialization script like this:
Readme
email-delivery-pkg
emailDeliveryService
Instance of EmailDeliveryService used for sending emails.
Since this service implements the IAppPkg interface, the recommended way of using it is by registering it in your app initialization script like this:
// appService is an instance of AppService (app-life-cycle-pkg)
appService.use(emailDeliveryService);emailDeliveryService methods
| Function | Argument Types | Returns | Description |
| - | - | - | - |
| sendEmail(data) | data: SendEmailDTO | Promise<void> | Sends an email |
DTO Interfaces
SendEmailDTO interface
| Key | Type | Notes | | - | - | - | | from | string | Sender address | | to | string[] | One or more recipient addresses | | subject | string | Email subject line | | body | string | HTML content of the email | | attachments | Record<string, Blob>, optional | Filename→Blob map for attachments | | inline | Record<string, Blob>, optional | Filename→Blob map for inline images | | cc | string[], optional | CC email addresses | | bcc | string[], optional | BCC email addresses | | replyTo | string, optional | Reply-To header address |
Imports
import {
emailDeliveryService,
SendEmailDTO
} from 'email-delivery-pkg';