Comments (7)
Do you have a copy of the error the API throws? I am using the MIME api, so I can send a raw mime message...which implies HTML parts should be acceptable, as with any other encoding...
from django-mailgun.
I have just successfully sent a multi-part (HTML and plaintext) email using this transport. I don't think the API end point is the issue here...
from django-mailgun.
I must have been doing it wrong. I tried sending an emdash HTML entity and got "—". Do I need to wrap HTML content in an HTML tag?
from django-mailgun.
Can you give a code sample?
from django-mailgun.
from django.core.mail import send_mail
send_mail('A Comment', '—from me', '[email protected]', ['[email protected]'], fail_silently=True)
from django-mailgun.
Running that code, it sends an email fine. IT is not encoded as HTML because you haven't created an HTML email. It won't magically be HTML, and the default of that convenience method is to send plaintext.
You should look at the django docs for sending email - https://docs.djangoproject.com/en/dev/topics/email/ specifically https://docs.djangoproject.com/en/dev/topics/email/#sending-alternative-content-types (basically you need to create a relevant EmailMessage).
Alternatively, simplifying sending html/multi-part emails is the focus of one of my other projects - https://github.com/bradwhittington/django-templated-email </shameless plug>
from django-mailgun.
Thanks for the pointer to the Django docs! That's what I needed! I really appreciate your help.
from django-mailgun.
Related Issues (20)
- Less reliance on python stdlib to encode email. HOT 2
- No v2.2 tag HOT 1
- Update PyPi version of django-mailgun HOT 8
- pip install problem in python 3 HOT 6
- mailgun v3 api. HOT 1
- New Feature: support scheduled delivery HOT 2
- Unicode error HOT 3
- Switch to using mailgun Python library instead of requests HOT 1
- Add test harness HOT 1
- Wheel file on pypi is broken HOT 4
- MailgunAPIError: <Response [400]> HOT 9
- Error in EmailMessage with MIMEBase attachment HOT 2
- Tests failing for Python 3 HOT 7
- 92 lost ) HOT 1
- Sending html only message convert it to text
- Allow sending Mailgun custom headers HOT 1
- Given this isn't supported, can you please update the pypi page for it, or pull the package? HOT 3
- Need option to configure API Base URL
- deleted from pypi HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-mailgun.