django-mailviews icon indicating copy to clipboard operation
django-mailviews copied to clipboard

Support downloading rendered `multipart/alternative` content.

Open tkaemming opened this issue 9 years ago • 1 comments

Allowing easy download of the rendered preview message (using Content-Disposition: attachment; filename="preview.eml") would make it easier to open up the message in an email client (rather than the browser) for a more representative preview.

tkaemming avatar Sep 30 '15 22:09 tkaemming

I've confirmed that this this works on OS X Mail.app, at least — this would work with an intermediate store for the rendered content:

response = HttpResponse(str(message.message()), content_type='multipart/mixed')
response['Content-Disposition'] = 'attachment; filename="preview.eml"'
return response

I'm not sure where that intermediate store would be — in-memory cache?

tkaemming avatar Oct 28 '15 23:10 tkaemming