An array of email addresses you want to send email to
Plaintext email body
Email subject
The email from which the email is addressed
async
(params, auths) => {
}
const AWS = require("aws-sdk")
const { accessKeyId, secretAccessKey } = auths.amazon_ses
const ses = new AWS.SES({
accessKeyId,
secretAccessKey,
region: 'us-east-1',
})
const { CcAddresses, BccAddresses, ToAddresses, html, text, subject, Source } = params
const sesParams = {
Destination: {
CcAddresses,
BccAddresses,
ToAddresses,
},
Message: {
Body: {
Text: {
Charset: "UTF-8",
Data: text,
}
},
Subject: {
Charset: "UTF-8",
Data: subject,
}
},
Source: "notifications@pipedream.com",
};
if (html) {
sesParams.Message.Body.Html = {
Charset: "UTF-8",
Data: html,
}
}
this.resp = await ses.sendEmail(sesParams).promise()