Skip to content

Commit

Permalink
fix: correctly initialize nodeMailer ses transport
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultRuby committed Aug 11, 2021
1 parent 95c5595 commit 610c9b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/fluid-ses.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {SES} from '@aws-sdk/client-ses';
import * as aws from '@aws-sdk/client-ses';
import {createTransport, SentMessageInfo, Transporter} from 'nodemailer';
import {CustomAttachment, IFluidSESConstructorOptions, IFluidSESMailOptions} from './types';
import {CustomTemplatingOptions, ITemplateEngine, TemplateEngine} from 'fluid-ses-templating';
Expand All @@ -24,12 +24,12 @@ export class FluidSes {
this._mailTrap = constructOptions.mailTrap || FluidSes._noTrap;
this._templateEngine = constructOptions.templateEngine || new TemplateEngine();

const mailer = new SES({
const ses = new aws.SES({
apiVersion: '2010-12-01',
region: constructOptions.region,
});

this._transporter = createTransport({SES: mailer});
this._transporter = createTransport({SES: { ses, aws }});
}

/**
Expand Down

0 comments on commit 610c9b1

Please sign in to comment.