
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
@aws-sdk/client-sesv2
Advanced tools
AWS SDK for JavaScript Sesv2 Client for Node.js, Browser and React Native
AWS SDK for JavaScript SESv2 Client for Node.js, Browser and React Native.
Amazon SES API v2
Amazon SES is an Amazon Web Services service that you can use to send email messages to your customers.
If you're new to Amazon SES API v2, you might find it helpful to review the Amazon Simple Email Service Developer Guide. The Amazon SES Developer Guide provides information and code samples that demonstrate how to use Amazon SES API v2 features programmatically.
To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-sesv2yarn add @aws-sdk/client-sesv2pnpm add @aws-sdk/client-sesv2The AWS SDK is modulized by clients and commands.
To send a request, you only need to import the SESv2Client and
the commands you need, for example ListTenantsCommand:
// ES5 example
const { SESv2Client, ListTenantsCommand } = require("@aws-sdk/client-sesv2");
// ES6+ example
import { SESv2Client, ListTenantsCommand } from "@aws-sdk/client-sesv2";
To send a request:
send operation on the client, providing the command object as input.const client = new SESv2Client({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListTenantsCommand(params);
We recommend using the await operator to wait for the promise returned by send operation as follows:
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
You can also use Promise chaining.
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
The aggregated client class is exported from the same package, but without the "Client" suffix.
SESv2 extends SESv2Client and additionally supports all operations, waiters, and paginators as methods.
This style may be familiar to you from the AWS SDK for JavaScript v2.
If you are bundling the AWS SDK, we recommend using only the bare-bones client (SESv2Client).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { SESv2 } from "@aws-sdk/client-sesv2";
const client = new SESv2({ region: "REGION" });
// async/await.
try {
const data = await client.listTenants(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listTenants(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listTenants(params, (err, data) => {
// process err and data.
});
When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
See also docs/ERROR_HANDLING.
Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
aws-sdk-js
on AWS Developer Blog.aws-sdk-js.To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.
This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-sesv2 package is updated.
To contribute to client you can check our generate clients scripts.
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
Nodemailer is a module for Node.js applications to allow easy email sending. It is not tied to any specific email service and can be used with various SMTP servers. Compared to @aws-sdk/client-sesv2, Nodemailer is more flexible in terms of email service providers but does not offer the same level of integration with AWS services.
SendGrid is a cloud-based service that provides email delivery and marketing campaigns. The @sendgrid/mail package allows you to send emails using SendGrid's API. Compared to @aws-sdk/client-sesv2, SendGrid offers additional features like email analytics and marketing tools but requires a separate SendGrid account.
Mailgun is an email automation service that provides a powerful API for sending, receiving, and tracking emails. The mailgun-js package allows you to interact with Mailgun's API. Compared to @aws-sdk/client-sesv2, Mailgun offers advanced email tracking and analytics but requires a Mailgun account.
FAQs
AWS SDK for JavaScript Sesv2 Client for Node.js, Browser and React Native
The npm package @aws-sdk/client-sesv2 receives a total of 2,525,595 weekly downloads. As such, @aws-sdk/client-sesv2 popularity was classified as popular.
We found that @aws-sdk/client-sesv2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.