fix: correct nodemailer SES transport config for v9 API

SES transport expects { sesClient, SendEmailCommand }, not { sesv2, ses }
This commit is contained in:
Kunthawat Greethong
2026-07-01 11:35:04 +07:00
parent eb785a53aa
commit 8aae25ef4f

View File

@@ -13,7 +13,7 @@
import express from 'express';
import cors from 'cors';
import nodemailer from 'nodemailer';
import { SESv2Client } from '@aws-sdk/client-sesv2';
import { SESv2Client, SendEmailCommand } from '@aws-sdk/client-sesv2';
import { fileURLToPath } from 'node:url';
import { dirname, join } from 'node:path';
import { readFileSync, existsSync } from 'node:fs';
@@ -35,7 +35,7 @@ if (sesConfigured) {
},
});
transporter = nodemailer.createTransport({
SES: { sesv2: true, ses },
SES: { sesClient: ses, SendEmailCommand },
});
}