-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Hey, i have a nest.js project where I import built templates and render them inside.
When I run my app locally it properly renders them into HTML and text. when i build this project and deploy to lambda it hangs when i try to render template file. No errors inside cloudwatch logs.
Can someone help me with this issue, am I doing something wrong?
Here is some code:
import { render } from '@vue-email/render';
....
async sendEmail({
to,
subject,
template: { templateFile, props },
source = `.....`,
}: SendEmailParams) {
const [html, text] = await Promise.all([
render(templateFile, props),
render(templateFile, props, { plainText: true })
]);
const sendEmailCommandParams: SendEmailCommandInput = {
Destination: { ToAddresses: [to] },
Source: source,
Message: {
Subject: { Charset: 'UTF-8', Data: subject },
Body: {
Html: { Charset: "UTF-8", Data: html },
Text: { Charset: "UTF-8", Data: text }
},
},
};
const sendEmailCommand = new SendEmailCommand(sendEmailCommandParams);
try {
return await this.client.send(sendEmailCommand);
} catch(e) {
console.error(e)
}
}
...
Metadata
Metadata
Assignees
Labels
No labels