Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change setSettings type from array to object #90

Open
PeterOcansey opened this issue Jun 14, 2024 · 0 comments
Open

Change setSettings type from array to object #90

PeterOcansey opened this issue Jun 14, 2024 · 0 comments

Comments

@PeterOcansey
Copy link
Contributor

SetSettings is declared to receive an array of EmailSettings.

image.png

Passing an array or object does not work

const params = new EmailParams()
.setFrom(new Sender('no-reply@youremail', 'YourEmail'))
.setTo([new Recipient(to)])
.setSubject(subject)
.setHtml(html)
.setSettings([{ track_clicks: false, track_opens: false, track_content: false }]);
await this.mailer.email.send(params);

Error

{
"message": "The settings.0 field must be true or false.",
"errors": {
"settings.0": [
"The settings.0 field must be true or false."
]
}

Settings should be an object, let's change the settings params to an Object

@PeterOcansey PeterOcansey added bug Something isn't working and removed bug Something isn't working labels Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant