adonisjs / mail

AdonisJS Email Provider
MIT License
102 stars 32 forks source link

Cannot send attachment using Resend #101

Open trulysinclair opened 1 month ago

trulysinclair commented 1 month ago

Package version

6.12.1

Describe the bug

When sending an email using a class email, everything works until trying to follow the attaching files process. All I get is failures, and upon looking at the error I get "Unable to send email using the resend transport: Response code 422 (Unprocessable Entity)".

export default class ChangelogNotification extends BaseMail {
  subject = 'Tailwind test'

  /**
   * The "prepare" method is called automatically when
   * the email is sent or queued.
   */
  prepare() {
    this.message.to('********@*****.net')
    this.message.html(ChangelogEmail({ text: 'Trust reputation' }))
    this.message.attach(app.makePath('public/deepslate.png'), {})
  }
}

Reproduction repo

No response

trulysinclair commented 1 month ago

I will attach a reproducible repo tomorrow