summaryrefslogtreecommitdiff
path: root/alot/mail
Commit message (Collapse)AuthorAge
* mail/envelope: improve the parse_template() algorithmHEADmasterAnton Khirnov2023-08-23
| | | | | | | | | | | | | It currently assumes that the string to be parsed contains LF-separated lines. This assumption is in general wrong, because the string may be written by the user's text editor and is thus outside of our control and may contain anything. In addition, since emails should use CRLF line endings, it is arguably more correct for text editors to write CRLF to .eml files. E.g. recent versions of vim do exactly that by default. Change the parsing code to accept any of CR/LF/CRLF line endings.
* mail/envelope: fix Envelope.from_mailto() after header changesAnton Khirnov2021-12-03
| | | | Pass them as strings rather than single-element lists.
* mail/reply: fix deleting address from AddrListAnton Khirnov2021-11-29
|
* helper: move guess_mimetype into its own fileAnton Khirnov2021-11-24
|
* mail/reply: rewrite recipient selectionAnton Khirnov2021-11-24
| | | | | | | | Thoroughly ensure that To+Cc contains neither our own address (except when it is wanted) nor any duplicates. Use structured headers provided by email.headerregistry to simplify dealing with addr-spec vs. mailbox (display name + <addr-spec>).
* mail: add a custom email policyAnton Khirnov2021-11-24
| | | | Uses structured parsing for more headers.
* mail/headers: fix header nameAnton Khirnov2021-11-24
| | | | It's X-BeenThere, not X-Been-There.
* commands/thread: move determining reply recipients to mail/replyAnton Khirnov2021-11-24
|
* commands/thread: split some reply handling code to a separate moduleAnton Khirnov2021-11-22
|
* mail/envelope: replace string literals with named constantsAnton Khirnov2021-11-22
|
* mail/envelope: set headers for sending as strings, not listsAnton Khirnov2021-11-22
|
* commands/thread: replace one more header with named constantAnton Khirnov2021-11-20
|
* mail/headers: use the canonical Capitalized spellingAnton Khirnov2021-11-20
|
* commands/thread: use named constants instead of string literalsAnton Khirnov2021-11-20
| | | | This is safer against typos.
* mail/envelope:_EnvelopeHeaders: make del delete all the entriesAnton Khirnov2021-11-20
|
* mail/envelope: add a special class for headersAnton Khirnov2021-11-20
| | | | Handle multiple headers with ordering and case-insensitive operations.
* envelope: drop unused codeAnton Khirnov2021-11-20
|
* mail/envelope: fix setting attachment paramsAnton Khirnov2021-06-21
| | | | | Actually pass them as a tuple of tuples. Also, set the charset param only for text attachments.
* mail/attachment: add 'B' suffix to under-kB sizesAnton Khirnov2021-05-15
| | | | | Displaying just a plain number leaves the user confused as to what the number means.
* mail/envelope: use params when constructing attachmentsAnton Khirnov2021-05-15
| | | | E.g. makes sure the charset is properly set for text attachments.
* mail/envelope: only accept valid UTF-8 for text attachmentsAnton Khirnov2021-05-15
| | | | | | | | Also set the charset parameter to UTF-8. While this restricts the kinds of files that may be attached, it ensures we do not generate invalid files, as we do not do charset detection currently. That can be implemented in the future, if necessary.
* mail/attachment: do not assume a non-trivial filenameAnton Khirnov2021-05-15
|
* mail/envelope: drop a workaround for very old libmagic versionsAnton Khirnov2021-05-15
| | | | 5.12 was released in 2013, we do not need to support it anymore.
* mail/envelope: add missing importAnton Khirnov2021-05-15
| | | | Forgotten during move in fe1450cba.
* mail/attachment: add methods forgotten in 309fb25eAnton Khirnov2021-02-01
|
* Add forgotten __init__.py filesAnton Khirnov2021-01-31
|
* mail/envelope: document Envolope.attach_file()Anton Khirnov2021-01-30
|
* db/attachment: move to mail/Anton Khirnov2021-01-30
| | | | It has nothing whatsoever to do with the database.
* db/attachment: simplify the Attachment classAnton Khirnov2021-01-30
| | | | | Make it a plain container around raw data and a few bits of metadata, rather than around a whole MIME part.
* db/envelope: move to a new module "mail"Anton Khirnov2021-01-30
It has nothing to do with the database.