adonisjs / mail

AdonisJS Email Provider
MIT License
106 stars 34 forks source link

Not work method .send() #10

Closed ntvsx193 closed 7 years ago

ntvsx193 commented 7 years ago

From gitter chat:

Installed the new @adonisjs/mail provider, and for some sort of reason got Cannot find module 'Mail', then added to aliases Adonis/Addons/Mail, and again no luck, when I try to send something it drops Mail.send is not a function

In doc https://github.com/adonisjs/adonis-mail/blob/develop/instructions.md example use Mail.send, but it's not worked. I use this for bypass problem:

const sender = await Mail.connection()
await sender.send('welcome', {
  user: user
}, (message) => {
  message.from('example@dot.com')
  message.to(user.email, user.name)
  message.subject('Test, Hello world!')
})
thetutlage commented 7 years ago

Can u verify this on the latest version? It should work

ntvsx193 commented 7 years ago

Yep, wait

ntvsx193 commented 7 years ago

Well done, it's worked with last changes!