@modelence/aws-ses
v1.0.1
Published
AWS SES Adapter fro Modelence
Readme
@modelence/aws-ses
AWS SES Adapter for Modelence
Installation
npm i @modelence/aws-sesOverview
This package provides sendEmail function that utilizes Amazon SES under the hood. The configuration can be set via Modelence Cloud or the following environment variables:
- MODELENCE_EMAIL_AWS_SES_REGION
- MODELENCE_EMAIL_AWS_SES_ACCESS_KEY_ID
- MODELENCE_EMAIL_AWS_SES_SECRET_ACCESS_KEY
Simple usage
import { sendEmail } from '@modelence/aws-ses';
sendEmail({
to: '[email protected]',
from: '[email protected]',
subject: 'Test Email',
html: '<h1>Test Email</h1>',
})Advanced example
import { sendEmail } from '@modelence/aws-ses';
sendEmail({
to: '[email protected]',
from: '[email protected]',
subject: 'Test Email',
html: '<h1>Test Email</h1>',
cc: '[email protected]',
bcc: '[email protected]',
attachments: [
{
name: "file.svg",
content: "data:image/svg+xml;base64,...",
contentType: "image/svg+xml"
},
]
});