discard plain text renderer

This commit is contained in:
m5r
2021-10-30 13:37:16 +02:00
parent 8e860a1ea3
commit 55f9083e7c
3 changed files with 9 additions and 19 deletions

View File

@ -11,7 +11,7 @@ const credentials = new Credentials({
const ses = new SES({ region: serverRuntimeConfig.awsSes.awsRegion, credentials });
type SendEmailParams = {
text: string;
text?: string;
html: string;
subject: string;
recipients: string[];
@ -22,10 +22,12 @@ export async function sendEmail({ text, html, subject, recipients }: SendEmailPa
Destination: { ToAddresses: recipients },
Message: {
Body: {
Text: {
Charset: "UTF-8",
Data: text,
},
Text: text
? {
Charset: "UTF-8",
Data: text,
}
: undefined,
Html: {
Charset: "UTF-8",
Data: html,