#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
--------------------------------+--------------------------------------
Changes (by Tim Graham):

 * type:  Uncategorized => New feature
 * component:  Uncategorized => Core (Mail)


Comment:

 Did you see the `EmailMessage.attach_file()` method? It "creates a new
 attachment using a file from your filesystem. Call it with the path of the
 file to attach and, optionally, the MIME type to use for the attachment.
 If the MIME type is omitted, it will be guessed from the filename."

 Adding more ways of how `__init__()`'s `attachments` parameter is
 interpreted seems more complex rather than simpler.

--
Ticket URL: <https://code.djangoproject.com/ticket/27465#comment:1>
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.a78faa20fa98a5cd29271d666334f638%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to