UBERF-10386: Fix SES client (#8737)

Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
Artyom Savchenko 2025-04-28 21:04:22 +07:00 committed by GitHub
parent 99303350c9
commit 107412e2d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,11 +13,12 @@
// limitations under the License.
//
import nodemailer, { type Transporter } from 'nodemailer'
import aws from '@aws-sdk/client-ses'
import * as aws from '@aws-sdk/client-ses'
import { type Config, type SmtpConfig, type SesConfig, getTlsSettings } from './config'
function smtp (config: SmtpConfig): Transporter {
console.log('Using SMTP config')
const auth =
config.Username !== undefined && config.Password !== undefined
? {
@ -37,6 +38,7 @@ function smtp (config: SmtpConfig): Transporter {
}
function ses (config: SesConfig): Transporter {
console.log('Using AWS SES config')
const ses = new aws.SES({
region: config.Region,
credentials: {