adonisjs / mail

AdonisJS Email Provider
MIT License
106 stars 34 forks source link

Can't send email to multiple recipients. #88

Closed bestmbed closed 1 year ago

bestmbed commented 1 year ago

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

Node.js and npm version

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'),
            })
          })
Julien-R44 commented 1 year ago

https://docs.adonisjs.com/guides/mailer#to