Closed pirmax closed 6 years ago
Impossible for me to tell why
You didn’t shared any code on how you send the email
What’s the output of mail.send
method?
Are there any exceptions?
I have no console.log() when I execute this function...
const user = await User.find(1)
const result = await Mail.send('emails.confirmation', user.toJSON(), (message) => {
message
.to(user.email)
.from('Website <noreply@domain.com>')
.subject('Please, confirm your Domain account!')
})
console.log(result)
Are there any exceptions being thrown or the program just hangs?
@thetutlage
await Mail.send('welcome',{}, (message) => {
message
.to('reza.haidari@gmail.com')
.from('test@gmail.com')
.subject('welcome')
})
error :
SyntaxError: Unexpected token M in JSON at position 0 at JSON.parse (
) at Request.basicAuth.headers.post.then (C:\Users\Mortina\Desktop\iptv-panel\node_modules\@adonisjs\mail\src\Mail\Drivers\Mailgun.js:161:32) at at process._tickCallback (internal/process/next_tick.js:188:7)
update: worked for me.
changed
MAILGUN_DOMAIN=https://api.mailgun.net/v3/my.domain
to
MAILGUN_DOMAIN=my.domain
and works.
Here is a quick tutorial to set up Adonis with Mailgun.
https://madsobel.com/blog/setting-up-mailgun-with-adonis.js/
Hi,
How use AdonisJS Mail with Mailgun driver?
My code:
The mail doesn't sended...