Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

174
Vistas
How to send emails to a created contact list using Amazon SES API v2

I need to send emails to many users, how to send them using Amazon SES API v2.

I created a contact list with a topic and created contact and I tried to send an email. It's throwing an error, I don't know where it went wrong. There are not enough resources out there.

Below is my code:

const SesV2 = new AWS.SESV2({ apiVersion: "2019-09-27" });

const sendEmailforTemplates = async (subject, template = "") => {
  const params = {
    Content: {
      Simple: {
        Body: {
          Html: {
            Data: template /* required */,
            Charset: "UTF-8",
          },
        },
        Subject: {
          Charset: "UTF-8",
          Data: subject,
        },
      },
    },
    FeedbackForwardingEmailAddress: "myemail@mydomain.com",
    FromEmailAddress: "support@mydomain.com",
    ListManagementOptions: {
      ContactListName: "contact_list" /* required */,
      TopicName: "users_topic",
    },
  };

  try {
    const data = await SesV2.sendEmail(params).promise();
    return data;
  } catch (error) {
    throw error;
  }
};

sendEmailforTemplates(
  "Test Subject",
  `
<!DOCTYPE html>
<html>
    <head>
        <title>
            First Web Page
        </title>
    </head>
 
    <body>
        Hello World Testing Message !!!
    </body>
</html>`
)
  .then((result) => {
    console.log("RESULT", result);
  })
  .catch((err) => {
    console.log("error", err.stack);
  });

Can someone help me on how to send emails to many users at once and tell me what I did wrong?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda