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

The sample code in the readme makes Sendgrid send back a 400. #64

Closed
BillBrower opened this issue Sep 3, 2017 · 2 comments
Closed

The sample code in the readme makes Sendgrid send back a 400. #64

BillBrower opened this issue Sep 3, 2017 · 2 comments

Comments

@BillBrower
Copy link

When I format the to address as directed in the readme I get a 400 back from Sendgrid.

mail = EmailMultiAlternatives(
  subject="Your Subject",
  body="This is a simple text email body.",
  from_email="Yamil Asusta <hello@yamilasusta.com>",
  to=["yamil@sendgrid.com"],
  headers={"Reply-To": "support@sendgrid.com"}
)
{
	"errors": [{
		"message": "Invalid type. Expected: string, given: array.",
		"field": "personalizations.0.to.0.email",
		"help": "http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.personalizations.to"
	}]
}
@jayhale
Copy link

jayhale commented Sep 26, 2017

This is fixed by #58. Recommend closing.

Evidence: https://github.com/jayhale/sendgrid-django-64

@BillBrower
Copy link
Author

Thanks @jayhale!

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

2 participants