https://serverless-stack.com/ logo
#sst
Title
# sst
s

Sakar

06/19/2021, 8:10 AM
@Frank how to send email using nodemailer and handlebars. How to config SST ?
r

Ross Coundon

06/19/2021, 8:24 AM
Send from a lambda? What's handlebars needed for?
s

Sakar

06/19/2021, 8:32 AM
Hi Ross, it is used for sending html designed emails.
r

Ross Coundon

06/19/2021, 8:34 AM
Ah, got you. So you're sending HTML emails from lambda? If so, it's no different, I believe it's integrated with SES and you can pass in a reference to the aws sdk when initialising. Are you asking how to set up SES?
s

Sakar

06/19/2021, 8:41 AM
Yes, please help me.
r

Ross Coundon

06/19/2021, 8:43 AM
I think you'll need to use CDK rather than SST. I'm not familiar with the setup on CDK but wanted to clarify the question for anyone else on here that's looking
f

Frank

06/20/2021, 3:11 AM
@Sakar, are you looking to verify your email address with SES?
Or are you asking how to make a call to AWS SES in your Lambda code to send an email?
s

Sakar

06/20/2021, 8:54 AM
@Frank I am looking to send html template mails from lambda code.
r

Ross Coundon

06/20/2021, 8:55 AM
Is it the lambda sending part that you're stuck with or the setup of SES via CDK?
s

Sakar

06/20/2021, 8:56 AM
@Frank Is there a away to push my local assets folder to the stack. I get TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument ...
f

Frank

06/20/2021, 7:02 PM
@Sakar can you share a sample repo with the issue? That’d be easier for me to see what you are currently doing and reproduce the issue.
s

Sakar

06/25/2021, 1:46 PM
@Frank made it work by reading the template from s3 bucket and gave it to handlebars template engine. Because lambada is not reading from temp dir. Anyway thanks for your support.