Skip to content

Commit 945f94b

Browse files
committed
fix(mailer): cast SES options to bridge duplicate @aws-sdk type identities
1 parent e53ac91 commit 945f94b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • apps/sim/lib/messaging/email/providers

apps/sim/lib/messaging/email/providers/ses.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ export function createSesProvider(): MailProvider | null {
1717
if (!region) return null
1818

1919
const sesClient = new SESv2Client({ region })
20+
// `@types/nodemailer` bundles its own copy of `@aws-sdk/client-sesv2`, so the
21+
// SendEmailCommand and SESv2Client we import are structurally identical at
22+
// runtime but TS sees them as a different declarations. Cast through the
23+
// nodemailer SES shape to bridge the two type identities.
2024
const sesOptions: SESTransport.Options = {
21-
SES: { sesClient, SendEmailCommand },
25+
SES: { sesClient, SendEmailCommand } as SESTransport.Options['SES'],
2226
}
2327
const transporter = nodemailer.createTransport(sesOptions)
2428

0 commit comments

Comments
 (0)