feed: Add the digest setting for multi-entry email
authorW. Trevor King <wking@tremily.us>
Sat, 13 Apr 2013 22:05:03 +0000 (18:05 -0400)
committerW. Trevor King <wking@tremily.us>
Fri, 10 May 2013 09:16:35 +0000 (05:16 -0400)
commit3f9adb574906b421488c258f31b2e79cae65b1cf
tree7a81ed6351856a4bea06e112013d86e27951f621
parent82f459b8bb88b9da414cb2b2e6906168e93974cf
feed: Add the digest setting for multi-entry email

For high-volume feeds, some users want to receive a single email per
Feed.run() instead of a separate email for each new entry in the feed.
If you enable the new digest setting, the per-entry messages are
packed into a single multipart/digest message instead of being mailed
individually.  The MIME details for digests are spelled out in RFC
2046 [1].

Peripheral changes:
* Added rss2email.feed._USER_AGENT, to get version information into
  the User-Agent message headers and to avoid repeating myself.
* Normalize multipart MIME boundaries for easier testing of
  multipart/digest messages.

[1]: http://tools.ietf.org/html/rfc2046#section-5.1.5

Signed-off-by: W. Trevor King <wking@tremily.us>
rss2email/config.py
rss2email/feed.py
test/gmane/2.config [new file with mode: 0644]
test/gmane/2.expected [new file with mode: 0644]
test/test.py