-
-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Package version
addonis 4.1.0
Node.js and npm version
node v10.16.3
npm 6.9.0
#Mailgun
MAILGUN_DOMAIN="sandboxaXXXXXXXFAKEXXXXXXXXXXX.mailgun.org"
MAILGUN_API_REGION="US"
MAILGUN_API_KEY="XXXXXXXXXXXXXXXXFAKEXXXXXXXXXXXXXXX"
Sample Code (to reproduce the issue)
await Mail.raw('<h1> HTML email </h1>', (message) => { message.from('foo@bar.com') message.to('baz@bar.com') })
Sample Code 2
`const data = request.only(['email', 'username', 'password'])
const user = await User.create(data)
await Mail.send('emails.welcome', user.toJSON(), (message) => {
message
.to(user.email)
.from('<from-email>')
.subject('Welcome to yardstick')
})`
ERROR MESSAGE
{"error":{"message":"Cannot read property 'body' of undefined","name":"TypeError","status":500,"frames":[{"file":"node_modules\\@adonisjs\\mail\\src\\Request\\index.js","filePath":"E:\\Desarrollos\\WeProtectAll\\code\\wpaccds-rest-api\\node_modules\\@adonisjs\\mail\\src\\Request\\index.js","method":"Request.post","line":98,"column":31,"context":{"start":93,"pre":" auth: this._basicAuth\n })\n return response.body\n } catch ({ response, message }) {\n const error = new Error(message)","line":" error.errors = response.body","post":" throw error\n }\n }\n}\n"},"isModule":true,"isNative":false,"isApp":false},{"file":"internal/process/next_tick.js","filePath":"internal/process/next_tick.js","method":"process._tickCallback","line":68,"column":7,"context":{},"isModule":false,"isNative":true,"isApp":false}]}}