DEV Community

Discussion on: How to send emails using Resend and React Email ?

Collapse
 
andrianv5 profile image
Andrian

Can I setup the Postcards designmodo.com/postcards/ to work in the same way?

Collapse
 
blaise_tiong profile image
Blaise Tiong

Hey Andrian, I just checked from designmodo.com/postcards/. Resend works with sending html as well by passing the html string via the html props with you are able to export via designmodo.com/postcards/. Depending on your use case you will most likely need some kind of templating engine (eg. mustache) to inject dynamic values within your html template. Hope this helps.

const templateKey = 'Template1' 
const htmlTemplates = {
    'Template1': `Html template from designmodo.com/postcards/`
    ...More templates here
  }

  return resend.emails.send(
    {
      ...payload,
      from: SENDER,      
      html: htmlTemplates[templateKey]
    },
    options
  );
Enter fullscreen mode Exit fullscreen mode