📮
Mailwind
  • 🚀Getting started
    • 👋Introduction
    • 🔗Add a provider
  • 📚Documentation
    • 🎨Tailwind configuration
    • 🔡Dynamic Expressions
    • 📱Responsive
  • API parameters
  • Sendgrid
    • Send an email
      • cURL
      • .NET
      • NodeJS
      • PHP
  • AWS SES
    • Obtain your credentials
    • Send an email
      • cURL
      • .NET
      • NodeJS
      • PHP
  • Resend
    • Send an email
      • cURL
      • .NET
      • NodeJS
      • PHP
Powered by GitBook
On this page
  1. Resend
  2. Send an email

NodeJS

Previous.NETNextPHP

Last updated 1 year ago

To make the HTTP request easier, we use for the example. Be free to use whatever you want

Find all parameters via this link:

fetch(`https://api.mailwind.io/v1/send/resend`, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        Authorization: 'Bearer <<YOUR_API_KEY_HERE>>',
    },
    body: JSON.stringify({
        layoutIdentifier: '<<YOUR_LAYOUT_ID>>',
        variables: {},
        code: null,
        from: 'Example <example@mailwind.io>',
        to: 'example@mailwind.io',
        subject: 'hello world',
    }),
})
    .then((response) => response.json())
    .then((data) => {
        console.log(data);
    })
    .catch((error) => {
        console.error('Error:', error);
    });
Fetch API
https://resend.com/docs/api-reference/emails/send-email#body-parameters