New feature: sending Files as email attachments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Singing & Dancing |
New
|
Wishlist
|
Unassigned |
Bug Description
Hi,
I need to support a use case where a File is sent out as a newsletter, in favor of a client of mine.
In my use case, only Files of mimetype application/pdf need to be supported this way. I need the (pdf) sent out as an attachment to the email (and not as a link in the email pointing to the file).
I am willing to do this development. My question is: has any work been done in this direction, that I can reuse?
Another question: is this a desired function in the core release? Meaning, can it get to accepted and released soon, if I develop it? (Or, should I rather do the development in a separate custom product, and hook in the code via zcml / monkeys, in which case it won't get into SnD?)
Best,
Balazs Ree
Hi,
S&D uses the email parser module to generate multipart emails. you can add attachments to the header as described here: docs.python. org/library/ email.message. html#email. message. Message. add_header
http://
The responsible S&D function which creates the html mail is 'create_html_mail' in: /svn.plone. org/svn/ collective/ collective. singing/ trunk/collectiv e/singing/ mail.py
https:/
I'm unsure your usecase is supported by default, but it shouldn't be very hard to implement. i would recommend you add a branch in collective where you checkin your code, so we could have a look at it and maybe reuse some code.
so +1 for adding this file attachment support :-)
daniel