#15793 closed Cleanup/optimization (wontfix)
Filebased email backend should save emails using the ".eml" standard extension
Reported by: | German M. Bravo | Owned by: | nobody |
---|---|---|---|
Component: | Core (Mail) | Version: | |
Severity: | Normal | Keywords: | |
Cc: | German M. Bravo | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | yes | UI/UX: | no |
Description
Emails saved by the filebased backend should be saved using .eml or .email extensions, this is the de facto standard extension for email files, using .email or .eml instead of .log has some other advantages as well. One of them is the possibility of opening emails directly in MS Outlook or preview them in OS X Finder by simply pressing space over the file.
Attachments (1)
Change History (13)
by , 14 years ago
Attachment: | #15793 - email_extension.diff added |
---|
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Component: | Uncategorized → Core (Mail) |
---|---|
Has patch: | set |
Type: | Uncategorized → Cleanup/optimization |
Version: | 1.2 |
comment:4 by , 14 years ago
Easy pickings: | unset |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:5 by , 14 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Patch is trivial and the change makes sense.
There is no standard for file extensions; .eml is certainly more appropriate than .log for an email.
comment:6 by , 14 years ago
Needs documentation: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Ready for checkin → Accepted |
Some documentation could be added to docs/topics/email.txt
about this, and even though the current extension isn't documented, this would be backwards incompatible for anyone who uses other scripts built on what we have now - a note will have to be added to the next version release docs noting this incompatible change.
comment:8 by , 14 years ago
Upon further investigation, the files created by the filebased email backend aren't really emails:
('-' * 79 + '\n')
is appended after each email, even if there is only one;- several message will be written to the same file if they are sent with one call to
send_messages()
.
While I understand and support the case for renaming these files as .eml — it's only a debug tool, being able to double-click the files will save time — I wonder if we should go further and use the mbox format (http://docs.python.org/library/mailbox.html#mailbox.mbox), which is the standard container for dumping several email to the same file. That would be more backwards incompatible, but at the same time much more useful. One possibility is to create "mbox" backend and then deprecate the "filebased" backend, but that seems overkill...
comment:9 by , 14 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I'm closing this as won't fix then.
Using ".eml" as an extension will probably work in most cases, but having more then one message in the same file is likely to break and confuse people. Using a mailbox seems like a good idea, but that's another story in another ticket :)
PS. I don't think we need to deprecate filebased backend even if we add an "mbox" one. It's less then 60 LOC, unlikely to break and useful as is.
comment:10 by , 13 years ago
Cc: | added |
---|---|
UI/UX: | unset |
comment:11 by , 13 years ago
The very simplistic implementation is now on github, bitbucket and pypi:
The standard extension that works both in Windows and Mac is .eml, not sure about Linux, but I suppose it should be a standard there as well?