balderdashy / sails-hook-email

Sails email hook
67 stars 34 forks source link

sails-hook-email is not getting configuration from config/email.js #17

Closed marlonpp closed 9 years ago

marlonpp commented 9 years ago

Hi, I'm trying to set configurations for the email hook, but it is not getting it from config/email.js. I tried to look inside email hook code and there is nothing there that is trying to acquire this configuration. And when I print sails.config.email from inside email hook index.js it is undefined.

Any ideas?

marlonpp commented 9 years ago

My bad, the right way to write the config file is:

module.exports.email = {
  service: 'Gmail',
  auth: {
    user: 'user.email@gmail.com',
    pass: '*****'
  },
  from: 'no-reply@test.com',
  testMode: false
}

I was missing the .email on module.export.