mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-11 01:40:32 +00:00
UBERF-10386: Fix SES client (#8737)
Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
parent
99303350c9
commit
107412e2d3
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user