-
-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Labels
Type: InvalidDoesn't really belong here. Maybe use discussion threads?Doesn't really belong here. Maybe use discussion threads?
Description
I can't send email with SES Amazon
Package version
"@adonisjs/ace": "^11.0.1",
"@adonisjs/assembler": "^3.0.0",
"@adonisjs/auth": "^5.1.1",
"@adonisjs/core": "~5.0.4-preview-rc",
"@adonisjs/lucid": "^10.0.0",
"@adonisjs/mail": "^7.1.1",
"@adonisjs/repl": "^1.0.0",
"@adonisjs/session": "^4.0.6",
"@adonisjs/view": "^3.0.0",
Node.js and npm version
- Node.js - v12.18.3
- Yarn - v1.22.5
Sample Code (to reproduce the issue)
import Mail from '@ioc:Adonis/Addons/Mail'
import Env from '@ioc:Adonis/Core/Env'
import { DateTime } from 'luxon'
export default class MailerService {
async sendMail(
user: { name: string; email: string },
event: { startTime: DateTime; url: string; password: string }
) {
await Mail.use('ses').send((message) => {
message
.from(Env.get('SES_EMAIL_FROM') as string)
.to(user.email)
.subject('Success')
.text('here')
})
}
}
Console Output
Unexpected token '.'
[1] .../node_modules/@adonisjs/mail/build/src/Helpers/prettyPrint.js:70
[1] output += `\n${colors.dim('│')} ${colors.dim('from:')} ${mail.message.from?.address}`;
[1] ^
[1]
[1] SyntaxError: Unexpected token '.'
[1] at compileFunction (<anonymous>)
[1] at wrapSafe (internal/modules/cjs/loader.js:1053:16)
[1] at Module._compile (internal/modules/cjs/loader.js:1101:27)
[1] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
[1] at Module.load (internal/modules/cjs/loader.js:985:32)
[1] at Function.Module._load (internal/modules/cjs/loader.js:878:14)
[1] at Module.require (internal/modules/cjs/loader.js:1025:19)
[1] at require (internal/modules/cjs/helpers.js:72:18)
[1] at Object.<anonymous> (.../node_modules/@adonisjs/mail/build/src/Mail/MailManager.js:22:23)
[1] at Module._compile (internal/modules/cjs/loader.js:1137:30)
[1] {
[1] error: .../node_modules/@adonisjs/mail/build/src/Helpers/prettyPrint.js:70
[1] output += `\n${colors.dim('│')} ${colors.dim('from:')} ${mail.message.from?.address}`;
[1] ^
[1]
[1] SyntaxError: Unexpected token '.'
[1] at compileFunction (<anonymous>)
[1] at wrapSafe (internal/modules/cjs/loader.js:1053:16)
[1] at Module._compile (internal/modules/cjs/loader.js:1101:27)
[1] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
[1] at Module.load (internal/modules/cjs/loader.js:985:32)
[1] at Function.Module._load (internal/modules/cjs/loader.js:878:14)
[1] at Module.require (internal/modules/cjs/loader.js:1025:19)
[1] at require (internal/modules/cjs/helpers.js:72:18)
[1] at Object.<anonymous> (.../node_modules/@adonisjs/mail/build/src/Mail/MailManager.js:22:23)
[1] at Module._compile (internal/modules/cjs/loader.js:1137:30)
Metadata
Metadata
Assignees
Labels
Type: InvalidDoesn't really belong here. Maybe use discussion threads?Doesn't really belong here. Maybe use discussion threads?