#27465: Allow EmailMessage(attachments=[...]) to load from the filesystem
--------------------------------+--------------------------------------
Reporter: Thomas Güttler | Owner: nobody
Type: New feature | Status: new
Component: Core (Mail) | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Comment (by Thomas Güttler):
Yes, I can use `attach_file()`, but this would mean I have to use a new
useless variable.
I would like to use this:
{{{
EmailMessage(...).send()
}}}
BTW, we had difficulties to implement sending of HTML mails which contain
inline images AND attached pdf files.
See: http://stackoverflow.com/questions/40389103/create-html-mail-with-
inline-image-and-pdf-attachment/40420648#40420648
This is toilet paper programming: wrapping, wrapping, wrapping, but inside
still the same dirty stuff.
Don't get me wrong it is not your fault.
Why does this code (creating mails) exist in django at all? Since the API
in python is not user friendly. I wanted
to use a different word first, but Python folks use different language
(unlike linux kernel hackers).
Back to topic. Please have a look at the ascii art in the stackoverflow
answer.
Up to now you can't easily create mails with this structure in Django. It
would be even better if you could
create them easily in python (without django).
--
Ticket URL: <https://code.djangoproject.com/ticket/27465#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.356e05024fe18c89e90bc703b3acb422%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.