How to setup email configuration? (Email configuration for the Password provider is invalid: Error: getaddrinfo ENOTFOUND)


#1

Hello everyone.

I am new to this technology. I am trying to setup email confirmation using PasswordAuthProvider as what the documentation suggested. But I got an error.

authProviders: [new auth.PasswordAuthProvider({
            emailHandlerConfig: {
                connectionString: 'smtp://-----:[email protected]',
                from: '"----" <[email protected]>',
                confirmActionConfig: {
                    subject: 'Email confirmation',
                    textTemplate: `Confirm your email address using the link below.
                                %BASE_URL%/confirm-email?token=%TOKEN%`,
                    htmlTemplate: `<html>
                    <body>
                        <h3>Email confirmation</h3>
                        <a href="%BASE_URL%/reset-password?token=%TOKEN%">Confirm your email</a>
                    </body>
                    </html>`
                }
            }, 
            autoCreateAdminUser: true 
        })]

Thank you in advance for the help.