minpham-com / medusa-plugin-smtp

6 stars 3 forks source link

How to use that in medusajs ?? #1

Open mitulp236 opened 1 year ago

mitulp236 commented 1 year ago

need to add in plugins sections ?

mortifia commented 1 year ago

not tested but inmedusa-config.js as plugin ?


const plugins = [
  ...
  {
    resolve: `medusa-plugin-smtp`,
    options:{
      ...
    }
  },
]
chrislaai commented 7 months ago

I have the same problem? Does anyone know?

darkcherrycreative commented 2 months ago

Did you guys ever get this working? The instructions are incomplete and unclear. I added the following, but just get a message on startup that " The subscriber in /mnt/g/xampp/htdev/***/test-store/node_modules/medusa-plugin-smtp/subscribers/invite.js is missing a config.":

{ resolve: "medusa-plugin-smtp", options: { fromEmail: process.env.ADMIN_EMAIL, transport: { host: process.env.SMTP_HOST, port: process.env.SMTP_PORT, secureConnection: false, auth: { user: process.env.SMTP_USERNAME, pass: process.env.SMTP_PASSWORD, }, tls: { ciphers: "SSLv3", }, requireTLS: true, },

  emailTemplatePath: "data/emailTemplates",
  templateMap: {
    // "eventname": "templatename",
    "order.placed": "orderplaced",
    "draft_order.created": "orderplaced",
    "order.updated": "orderplaced",
  },
},

},

n3cr0murl0c commented 1 month ago

Having the same problem as @darkcherrycreative ... Anyone with any update? Reading through the code on those warnings they doesn't appear to je importing an options object from medusa.config

darkcherrycreative commented 1 month ago

Having the same problem as @darkcherrycreative ... Anyone with any update? Reading through the code on those warnings they doesn't appear to je importing an options object from medusa.config

I never got this working, so I abandoned the package and used this instead: https://github.com/RootXP-dev/medusa-email-plugin

No problems at all with that, also includes some simple base templates to get you started.