Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

added code to pull out recipient variables from header #26

Merged
merged 3 commits into from
Sep 15, 2015

Conversation

wmsmith
Copy link
Contributor

@wmsmith wmsmith commented Sep 14, 2015

To support batch sending, the API recommends (https://documentation.mailgun.com/user_manual.html#batch-sending) that one should use recipient variables. I did not know of a cleaner way to implement their sending without modifying other parts of Django, so I added them to the extra_headers attribute on EmailMessage and added code to pop them out in _send().

If there is a better way, please let me know.

@pydanny
Copy link
Collaborator

pydanny commented Sep 14, 2015

I don't know of a better way, but I do have two requests:

  1. Add Documentation. How do you get recipient variables into the header? I'll accept this pull request once that's done. 😄
  2. Add a Tests. This isn't mandatory because I haven't yet documented how to run tests against django-mailgun.

@wmsmith
Copy link
Contributor Author

wmsmith commented Sep 14, 2015

Thanks for the prompt response! I added some instructions to the README along with a short code example. If you were looking for something different, please let me know.

Also, I agree on the test but I'm not sure how I would test against Mailgun without credentials. If you know of a way, let me know.

pydanny added a commit that referenced this pull request Sep 15, 2015
added code to pull out recipient variables from header
@pydanny pydanny merged commit 4886f58 into BradWhittington:master Sep 15, 2015
@pydanny
Copy link
Collaborator

pydanny commented Sep 15, 2015

That's a pretty awesome feature @wmsmith. Thank you so much for your contribution! 🚢

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants