Getting this error when I try setup the mail deliv...
# support-questions-legacy
j
Getting this error when I try setup the mail delivery service.
Copy code
/usr/src/ccs-supertoken/node_modules/supertokens-node/lib/build/recipe/emailpassword/emaildelivery/services/smtp/index.js:52
            host: config.smtpSettings.host,
                                      ^

TypeError: Cannot read properties of undefined (reading 'host')
    at new SMTPService (/usr/src/ccs-supertoken/node_modules/supertokens-node/lib/build/recipe/emailpassword/emaildelivery/services/smtp/index.js:52:39)
    at Object.<anonymous> (/usr/src/ccs-supertoken/config.js:52:30)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (/usr/src/ccs-supertoken/index.js:12:49)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)

Node.js v18.17.1
Copy code
js
const { SMTPService } = require("supertokens-node/recipe/emailpassword/emaildelivery");
const EmailVerification = require("supertokens-node/recipe/emailverification");
Copy code
js
                emailDelivery: {
                    // Use SMTP service
                    service: new SMTPService({ smtpCredentials }),
                    // Custom override for mail sending, when using this
                    // we can rather POST data to WP to send the email, 
                    // disabe the above SMTP service when doing this
                    override: (originalImplementation) => {
                        return {
                            ...originalImplementation,
                            sendEmail: async function (input) {
                                // TODO: create and send password reset email
                                postBin(input);
                                // Keep the below line in to still allow the default email functionality.
                                // Remove if you want to disable emails and do above logic for WP Posting
                                return originalImplementation.sendEmail(input);
                            }
                        }
                    }
                },
3 Views