TypeError in using SendBulkEmail

0

Hello,

I'm a new AWS SES trying to create a notification tool for a startup.

I'm still in the sandbox node but I'm trying to use the SendBulkEmail API to send messages to verified email addresses. However, when I call the sendBulkEmail function, it gives me the error

TypeError: (intermediate value).sendBulkEmail is not a function

Here's my code:

import * as AWS from '@aws-sdk/client-ses';

/******* Parameter Object *****************/ // Create sendEmail params var params = { BulkEmailEntries: [ { Destination: { BccAddresses: "abc@gmail.com", CcAddresses: "abc@gmail.com", ToAddresses: [ 'xyz@gmail.com', 'random@gmail.com', 'random2@gmail.com', 'random3@gmail.com', 'random4@gmai.com' ] } } ], "DefaultContent": "Hey everyone, I'm testing the bulk email function", FromEmailAddress: "sender@gmail.com",

ReplyToAddresses: [ "reply@gmail.com" ]

};

// Create the promise and SES service object var sendPromise = new AWS.SES({apiVersion: '2010-12-01'}).sendBulkEmail(params).promise();

// Handle promise's fulfilled/rejected states sendPromise.then( function(data) { console.log(data.MessageId); }).catch( function(err) { console.error(err, err.stack); });

Thank you very much!!!!

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions