1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

Revert "fix: uri encode smtp connection string (#901)"

This reverts commit 8f1a5f5a64.
This commit is contained in:
Ivar Conradi Østhus 2021-08-16 10:24:28 +02:00
parent 1d9df2917d
commit bb9ae03b27
No known key found for this signature in database
GPG Key ID: 31AC596886B0BD09

View File

@ -2,7 +2,6 @@ import { createTransport, Transporter } from 'nodemailer';
import Mustache from 'mustache';
import path from 'path';
import { readFileSync, existsSync } from 'fs';
import { escape } from 'querystring';
import { Logger, LogProvider } from '../logger';
import NotFoundError from '../error/notfound-error';
import { IEmailOption } from '../types/option';
@ -58,9 +57,7 @@ export class EmailService {
if (email.host === 'test') {
this.mailer = createTransport({ jsonTransport: true });
} else {
const connectionString = escape(
`${email.smtpuser}:${email.smtppass}@${email.host}:${email.port}`,
);
const connectionString = `${email.smtpuser}:${email.smtppass}@${email.host}:${email.port}`;
this.mailer = email.secure
? createTransport(`smtps://${connectionString}`)
: createTransport(`smtp://${connectionString}`);