Skip to content

Can't send email to multiple recipients. #88

@bestmbed

Description

@bestmbed

Can't send email to multiple recipients.

I tried to send email to multiple recipients by using Mail.sendLater But i got an error like below picture.
Screenshot 2566-06-16 at 10 59 51

Could you please help me to solve this issue.

Thank you.

Package version

  • "@adonisjs/mail": "^8.1.2"

Node.js and npm version

  • node --version v20.0.0
  • pnpm -v 8.6.2

Sample Code (to reproduce the issue)

const mails :string = 'best@example.com, test2@example.com'      
await Mail.sendLater((message) => {
          message
            .from('wareboxtech.service@gmail.com')
            .to(mails)
            .subject(`${data.type}`)
            .htmlView('emails/template', {
              alarm: data.type,
              site_name: data.site_name,
              device_no: data.device_id,
              timestamp: moment().format('DD MM YYYY hh:mm:ss'),
            })
          })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions