From 8c51d629975cfef8e2e4bfa4025bf392d985b6ca Mon Sep 17 00:00:00 2001 From: johannchopin <31794680+johannchopin@users.noreply.github.com> Date: Tue, 10 Jan 2023 00:25:24 +0100 Subject: [PATCH] Fix configuration example for nodemailer provider --- packages/providers/email-nodemailer/README.md | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/packages/providers/email-nodemailer/README.md b/packages/providers/email-nodemailer/README.md index 5f38850e28..41166aee71 100644 --- a/packages/providers/email-nodemailer/README.md +++ b/packages/providers/email-nodemailer/README.md @@ -60,11 +60,13 @@ You can override the default configurations for specific environments. E.g. for ```js module.exports = ({ env }) => ({ email: { - provider: 'nodemailer', - providerOptions: { - host: 'localhost', - port: 1025, - ignoreTLS: true, + config: { + provider: 'nodemailer', + providerOptions: { + host: 'localhost', + port: 1025, + ignoreTLS: true, + }, }, }, }); @@ -83,24 +85,26 @@ const nodemailerNTLMAuth = require('nodemailer-ntlm-auth'); module.exports = ({ env }) => ({ email: { - provider: 'nodemailer', - providerOptions: { - host: env('SMTP_HOST', 'smtp.example.com'), - port: env('SMTP_PORT', 587), - auth: { - type: 'custom', - method: 'NTLM', - user: env('SMTP_USERNAME'), - pass: env('SMTP_PASSWORD'), + config: { + provider: 'nodemailer', + providerOptions: { + host: env('SMTP_HOST', 'smtp.example.com'), + port: env('SMTP_PORT', 587), + auth: { + type: 'custom', + method: 'NTLM', + user: env('SMTP_USERNAME'), + pass: env('SMTP_PASSWORD'), + }, + customAuth: { + NTLM: nodemailerNTLMAuth, + }, }, - customAuth: { - NTLM: nodemailerNTLMAuth, + settings: { + defaultFrom: 'hello@example.com', + defaultReplyTo: 'hello@example.com', }, }, - settings: { - defaultFrom: 'hello@example.com', - defaultReplyTo: 'hello@example.com', - }, }, }); ```