For HTML rendering of document based notifications, we'd need to
- include some widgets (e.g, link to the document) in notifications only.
- don't include some widgets in notifications.
- embed images and CSS in multipart/related MIME structures
The cleanest way to do that would be to define a new layout mode, say view_email. For the first two use-cases, widget visibility conditions do already depend on the layout mode.
Also, the widget is aware of the layout mode at rendering time. Image widgets could then take approriate actions to store the image content somewhere for later inclusion in the final RFC 822 message.
Caveat: we'd have to define layout_default_view_email and a few declinations. Fortunately this will produce few ZPT duplication since layout_default_view does nothing but leverage a macro.
I'm leaving "CPS (global)" as a component, because this involves CPSSchemas (Image widgets), CPSDocument (layout methods), CPSSubscriptions (trigger with view_email layout mode, collection of image and css parts) and CPSUtil (improvement of mail sending utilities).