[issue634412] RFC 2387 in email package

2014-06-11 Thread R. David Murray

R. David Murray added the comment:

It is a clever idea, and might be worth considering, but it doesn't feel 
natural to have to specify the attachments before the html.  What I'd really 
like is an API that hides the messy details of the RFC from the library user, 
and I haven't thought of anything I'm satisfied with yet.  Specifically, it 
would be great if the 'keys' could be specially formatted strings (@mypicid1@ 
or something like that) and the helper would automatically replace them with 
cids in both the html and the attachments.

It would probably be worth taking this discussion to the email-sig mailing list.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue634412] RFC 2387 in email package

2014-06-11 Thread Abhilash Raj

Abhilash Raj added the comment:

David: What about his API then?
   https://gist.github.com/maxking/b3ed4f54674e5f480275

Here cids are generated behind the scenes when the html part is added and those 
 cids are assigned to the attachments on the first come basis?
Like {0} is replaced by the cid of `roasted-asparagus.jpg`, I think you get the 
idea?

I will post a brief summary of this discussion to email-sig list later today.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue634412] RFC 2387 in email package

2014-06-10 Thread Abhilash Raj

Abhilash Raj added the comment:

David: How does this API look?
  https://gist.github.com/maxking/2f37bae7875dde027e3c

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue634412] RFC 2387 in email package

2014-06-06 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue634412] RFC 2387 in email package

2014-06-05 Thread Abhilash Raj

Abhilash Raj added the comment:

Will the building of that 'dict' really be that difficult? Can we not walk over 
all the attachments and simply map cid to name of the attachment? All 
attachments have to have different names if I am right?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue634412] RFC 2387 in email package

2014-06-05 Thread R. David Murray

R. David Murray added the comment:

No, there is no requirement that attachment names be unique, and in fact no 
requirement that attachments (inline attachments, which is mostly what we are 
dealing with for 'related') have names at all.  I have seen messages in the 
wild that had more than one attachment with the same name, and it revealed a 
bug in the system I was working on at the time :)

Building the dictionary is not *hard*.  I am not satisfied with the code shown 
in 
 
  
https://docs.python.org/3/library/email-examples.html#examples-using-the-provisional-api

I think there should be a more elegant way to spell the multipart/related 
creation parts of that example.  Feeding a dictionary in as the entire 
'related' part would be better, but in order to create that dictionary you have 
to explicitly create MIMEPart subparts and store them in the dict.  That may be 
what we end up doing, but I think it would be nice if there was a more 
intuitive way to spell it.  

Especially since as it stands you have to explicitly munge the CIDs.  You 
shouldn't have to do that, the library should take care of that for you.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue634412] RFC 2387 in email package

2014-06-02 Thread Abhilash Raj

Abhilash Raj added the comment:

David: I had a look at the examples and documentation as you said. I found some 
support for multipart/related in the form of  `add_related` and `set_related` 
methods. But I am still confused on how to make content_manager recognize 
miltipart/related messages. Do I need to add a new content-manager instance 
like `raw_content_manager` or something else?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue634412] RFC 2387 in email package

2014-06-02 Thread R. David Murray

R. David Murray added the comment:

My idea (which I haven't worked out in detail) is to add either a new content 
manager that extends raw_data_manager, or just add to raw_data_manager, a 
handler for 'multipart/related'.  The set handler would handle a value of type 
'dict', and expect it to contain a mapping from content-ids to...something.  
What the 'something' is is the part I'm not clear on yet.  Trivially it could 
be MIMEParts, but that may not be the most convenient API.  Or perhaps it 
*should* be MIMEParts, with a helper utility to make building the dict easy.  
The 'get' handler would return a dict in the same format, whatever we decide 
that format should be.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue634412] RFC 2387 in email package

2014-05-16 Thread Abhilash Raj

Abhilash Raj added the comment:

I would like to work on this issue, but I would need a little help to start 
working on this feature.

--
nosy: +abhilash.raj

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue634412] RFC 2387 in email package

2014-05-16 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue634412] RFC 2387 in email package

2014-05-16 Thread R. David Murray

R. David Murray added the comment:

There is some support for this in the new email policies.  Take a look at the 
new examples in the 3.4 email documentation in particular.

The additional thing I would like to see is support in the content manager that 
recognizes multipart/related and makes it easy to manage one.  I have to find 
time to look at it again myself before I can provide my ideas of what the API 
should be.  Maybe you could take a look at the docs and examples and how the 
contentmanager works, and see if you have thoughts or questions.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue634412] RFC 2387 in email package

2013-11-06 Thread A.M. Kuchling

Changes by A.M. Kuchling li...@amk.ca:


--
keywords:  -easy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue634412] RFC 2387 in email package

2012-08-24 Thread R. David Murray

R. David Murray added the comment:

http://tools.ietf.org/html/rfc2387 has obsoleted 2112.

--
title: RFC 2112 in email package - RFC 2387 in email package
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue634412
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com