{"action":"closed","issue":{"url":"https://api.github.com/repos/sendgrid/sendgrid-python/issues/285","repository_url":"https://api.github.com/repos/sendgrid/sendgrid-python","labels_url":"https://api.github.com/repos/sendgrid/sendgrid-python/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/sendgrid/sendgrid-python/issues/285/comments","events_url":"https://api.github.com/repos/sendgrid/sendgrid-python/issues/285/events","html_url":"https://github.com/sendgrid/sendgrid-python/issues/285","id":192573002,"number":285,"title":"I'm getting 400 bad request when trying to send Email from Django","user":{"login":"jhotujec","id":784318,"avatar_url":"https://avatars.githubusercontent.com/u/784318?v=3","gravatar_id":"","url":"https://api.github.com/users/jhotujec","html_url":"https://github.com/jhotujec","followers_url":"https://api.github.com/users/jhotujec/followers","following_url":"https://api.github.com/users/jhotujec/following{/other_user}","gists_url":"https://api.github.com/users/jhotujec/gists{/gist_id}","starred_url":"https://api.github.com/users/jhotujec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhotujec/subscriptions","organizations_url":"https://api.github.com/users/jhotujec/orgs","repos_url":"https://api.github.com/users/jhotujec/repos","events_url":"https://api.github.com/users/jhotujec/events{/privacy}","received_events_url":"https://api.github.com/users/jhotujec/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-30T14:02:15Z","updated_at":"2016-11-30T14:07:03Z","closed_at":"2016-11-30T14:07:03Z","body":"#### Issue Summary\r\n\r\nWhen I try sending email from Django with sendgrid, I get `HTTPError: HTTP Error 400: Bad Request`\r\n\r\n#### How I build email\r\n```\r\n    mail = Mail()\r\n    mail.set_from(Email(\"test@example.com\"))\r\n    mail.set_subject(\"Hello World from the SendGrid Python Library\")\r\n\r\n    personalization = Personalization()\r\n    personalization.add_to(Email(\"me@gmail.com\"))\r\n    personalization.add_substitution(Substitution(\"%test%\", \"Example User\"))\r\n\r\n    mail.set_template_id(\"xxxxxxxx\")\r\n\r\n    mail.add_content(Content(\"text/plain\", \"some text here\"))\r\n\r\n    sg = sendgrid.SendGridAPIClient(apikey=\"xxxxxxxxx\")\r\n    data = mail.get()\r\n    response = sg.client.mail.send.post(request_body=data)\r\n```"}}
{"actor":{"display_login":"jhotujec"}}