javascript - Nodemailer SES TRANSPORT Error: TypeError: this.ses.sendRawEmail is not a function - Stack Overflow

admin2025-04-22  0

I am trying to configure AWS SES with the help of nodemailer.
So I am following the documentation.
This is the code that they provided and that I tested:

let nodemailer = require("nodemailer");
let aws = require("@aws-sdk/client-ses");

const ses = new aws.SES({
  apiVersion: "2010-12-01",
  region: "us-west-2",
});

// create Nodemailer SES transporter
let transporter = nodemailer.createTransport({
  SES: { ses, aws },
});

// send some mail
transporter.sendMail(
  {
    // These are obviously not the actual emails I am using
    from: "configured_aws_email",
    to: "recipient_email",
    subject: "Message",
    text: "I hope this message gets sent!",
    ses: {
      // optional extra arguments for SendRawEmail
      Tags: [
        {
          Name: "tag_name",
          Value: "tag_value",
        },
      ],
    },
  },
  (err, info) => {
    console.log(
      "
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745289687a294608.html

最新回复(0)