Commit Graph

22 Commits (258b6c8fe81c7d80c943f8e827f87c936c38698e)

Author SHA1 Message Date
Manos Pitsidianakis 258b6c8fe8
melib: add tags() method in MailBackend
Add tags() method that returns Option<Arc<RwLock<BTreeMap<u64, String>>>>.

The BTreeMap holds available tags in a mail backend and uses the tag's
hash as key.

The method returns an Option because not all backends may support
tagging.
2019-11-30 17:37:00 +02:00
Manos Pitsidianakis 51628ac9d2
ui: move list_management mod to melib
list_management module includes some small functions to handle mailing
list metadata (List-* headers)
2019-11-18 20:37:48 +02:00
Manos Pitsidianakis fc2d9a684d
melib/imap: set has_attachments based on BODYSTRUCTURE
fetch BODYSTRUCTURE along with ENVELOPE from server and set
has_attachments based on the MIME structure of the envelope.

Notes: BODYSTRUCTURE returns the MIME structure of the envelope without
the data, so if it includes a multipart/mixed it *should* have
attachments.
ENVELOPE returns basic headers of the message like Sender, Subject, Date
etc.
2019-11-18 13:00:43 +02:00
Manos Pitsidianakis 7463248da8
melib: change BackendOp::set_flag() signature 2019-11-15 21:32:55 +02:00
Manos Pitsidianakis 3af6f338ce
add sqlite3 feature WIP 2019-11-08 15:13:41 +02:00
Manos Pitsidianakis 68c40a2920
melib: return Result with error when an IO operation fails
Don't unwrap anything because this might be temporary, for example a
short IMAP disconnection.
2019-09-27 13:40:02 +03:00
Manos Pitsidianakis f27b815aa7
Add verification of GPG signed messages 2019-09-26 13:11:08 +03:00
Manos Pitsidianakis 9305e543cf
melib: add a `body` field to Attachment
Attachment needs to know the range of bytes where the body part of the
attachment is located. The Attachment.raw field contains the entire
attachment, headers and body. The new Attachment.body fields contains a
`StrBuilder` which contains the offset and length of the body part inside
`raw`.
2019-09-26 13:10:06 +03:00
Manos Pitsidianakis 32fe8a8b9b
melib: move email.rs back 2019-09-20 10:39:24 +03:00
Manos Pitsidianakis b08001ca5d
melib: create address.rs from email.rs 2019-09-20 10:37:51 +03:00
Manos Pitsidianakis ecb3fd7f3d
Add dyn keyword to Trait objects
And fix some unused var warnings as well
2019-09-15 13:21:14 +03:00
Manos Pitsidianakis d1d11356db
imap: get() ENVELOPE instead of RFC822.HEADER; it's faster 2019-09-15 13:21:14 +03:00
Manos Pitsidianakis 0812242f60
Add IMAP backend
TODOs: new message events (untagged responses)
2019-09-15 13:21:13 +03:00
Manos Pitsidianakis c17bb24f0d
melib: refactor attachments and attachment_types interfaces 2019-07-30 21:33:15 +03:00
Manos Pitsidianakis 38da6c83b9
melib: add read-only support for mbox 2019-07-28 20:20:14 +03:00
Manos Pitsidianakis f4f3b87f84
ui: add selections to CompactListing
Select multiple entries by pressing 'v'. Set read/unread and delete
actions are then performed on the selected entries.
2019-06-25 10:37:18 +03:00
Manos Pitsidianakis 8c97336307
ui: add set as read/unread, delete actions
Implemented only in compact listing for now.
2019-06-23 11:42:48 +03:00
Manos Pitsidianakis ba1d0c42e0
melib: add struct and parser for mailto: links 2019-06-18 21:59:50 +03:00
Manos Pitsidianakis ee07aa8686
melib: add other_headers field in Envelope
Store headers with non-hardcoded names in a hash map.
2019-06-18 21:38:30 +03:00
Manos Pitsidianakis 24831b3c13
Fix warnings, lints, and 2018 errors 2019-06-18 21:14:14 +03:00
Manos Pitsidianakis d0039740b0
melib: add has_attachments property to Envelope
Check subattachments in has_attachments check.

Instead of getting a flattened attachment view of multipart/mixed (eg
[multipart/mixed, text/plain, text/plain]) get only the subattachments
(eg [text/plain, text/plain]). Don't count text-only multipart/mixed as attachments
2019-06-10 19:40:50 +03:00
Manos Pitsidianakis c6674a294d
melib: unwrap mailbox module 2019-06-10 19:40:50 +03:00