Skip to content

Commit

Permalink
fix(mailer): secure smtp
Browse files Browse the repository at this point in the history
  • Loading branch information
rudemex committed Dec 20, 2022
1 parent f2fd67f commit e883883
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/mailer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export default registerAs('config', (): Typings.AppConfig => {
transport: {
host: process.env.EMAIL_HOST,
port: parseInt(process.env.EMAIL_PORT, 10) || 587,
secure: false,
secure: true,
requireTLS: true,
auth: {
user: process.env.EMAIL_USER,
pass: process.env.EMAIL_PASSWORD,
Expand Down Expand Up @@ -153,7 +154,8 @@ export default registerAs('config', (): Typings.AppConfig => {
transport: {
host: process.env.EMAIL_HOST,
port: parseInt(process.env.EMAIL_PORT, 10) || 587,
secure: false,
secure: true,
requireTLS: true,
auth: {
user: process.env.EMAIL_USER,
pass: process.env.EMAIL_PASSWORD,
Expand Down
1 change: 1 addition & 0 deletions packages/mailer/src/__test__/mailer.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ describe('MailerService', () => {
const service = await getMailerServiceForOptions({
transport: {
secure: true,
requireTLS: true,
auth: {
user: 'user@domain.com',
pass: 'pass',
Expand Down
4 changes: 4 additions & 0 deletions packages/mailer/src/mailer/constants/mailer.constant.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
export const MAILER_OPTIONS = 'MAILER_OPTIONS';
export const MAILER_TRANSPORT_FACTORY = 'MAILER_TRANSPORT_FACTORY';
export const defaultTransportOptions = {
secure: true,
requireTLS: true,
};

0 comments on commit e883883

Please sign in to comment.