mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-12 10:25:51 +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.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
import nodemailer, { type Transporter } from 'nodemailer'
|
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'
|
import { type Config, type SmtpConfig, type SesConfig, getTlsSettings } from './config'
|
||||||
|
|
||||||
function smtp (config: SmtpConfig): Transporter {
|
function smtp (config: SmtpConfig): Transporter {
|
||||||
|
console.log('Using SMTP config')
|
||||||
const auth =
|
const auth =
|
||||||
config.Username !== undefined && config.Password !== undefined
|
config.Username !== undefined && config.Password !== undefined
|
||||||
? {
|
? {
|
||||||
@ -37,6 +38,7 @@ function smtp (config: SmtpConfig): Transporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ses (config: SesConfig): Transporter {
|
function ses (config: SesConfig): Transporter {
|
||||||
|
console.log('Using AWS SES config')
|
||||||
const ses = new aws.SES({
|
const ses = new aws.SES({
|
||||||
region: config.Region,
|
region: config.Region,
|
||||||
credentials: {
|
credentials: {
|
||||||
|
Loading…
Reference in New Issue
Block a user