Remove `Message.without_bcc` ctor since we can now get GMime to exclude
BCC headers when serialising, avoiding the overhead of taking a complete
copy of the message just to strip BCCs.
Rename `get_network_buffer` to `get_rfc822_buffer` to be a bit more
explicit in that's the way to get an actual RFC822 formatted message.
Replace book args with flags, and take a protocol-specific approach
rather than feature-specific, because in the end you're either going to
want all the SMTP formatting quirks or none of them.
Remove custom dot-stuffing support from Smtp.ClientConnection, since it
is redundant.
Make constructors use the Message.from_gmime where possible. Merge that
and stock_from_gmime so it's clear the stocking only happens in the
ctor. Update stocking to use high-level GMime APIs where available to
avoid re-parsing header values.
Split Geary.RFC822.MessageData interface up into DecodedMessageData and
EncodedMessageData so the difference between the two is clear and they
can't be used interchangeably.
Add `DecodedMessageData::to_rfc822_string` to provide a common interface
for round-tripping decoded data.
Update all classes to implement one of these and follow the same general
API patterns.
Ensure that if stopping the conversation monitor while it is waiting
for the folder to open that the folder isn't closed, and if an error
is thrown when opening the folder that it gets thrown by
::start_monitoring anyway.
Hopefully fixes#741
Add `create_personal_folder` method, implement it in
ImapEngine.GenericAccount. Use this when creating required special
folders to reduce code duplication.
The `SpecialFolderType` was somewhat mis-named, since the special use
does not (in most cases) confer any special type, rather it's simply
defines what a particular folder is used /for/.
As such, rename the enum to to `Geary.Folder.SpecialUse`, moving it in
to the `Folder` class, since it relates specifically to folders, also
rename `Folder::special_folder_type` and
`Folder::special_folder_type_changed` reflect the above and not
duplicate the type name, and similarly rename
`Account::folders_special_type`.
Update the many call sites.
When attaching body parts to a message from a composed email, don't
re-use the transfer encoding used from the plain part for the HTML part,
since the latter may be different if e.g. the HTML contains no line
breaks and hence is a single long line.
See #771
By not closing/flushing the buffer, ::get_best_charset and
::get_best_encoding were not including the last line of the buffer, and
missing single very long lines when guessing the encoding.
Fixes#771
Convert mailbox and mailbox RW/RO state accessors to properties and
rename to be more explicit about what they mean. Remove mailbox arg
from ::getProtocolState() since it's unused.
Add namespace accessors, handle updating namespaces when processing
the received data, not when executing the command so that unsolicited
namespaces are still recognised. Clear namespaces when new data is
receieved and when not in selected and auth states. Add unit tests.
Move Capabilities to the api directory and make immutable.
Don't pass around out params to simply increment the revision and use a
field in ClientSession, just use the last capability instance. Ensure
after starting a TLS session capabilities are cleared. Add unit tests
for getting both implicit and explicity capaibilities when initiating
a client session.
Allow specifying the connect greeting timeout length, ensure that
any connect errors are in place before releasing the connect waiter,
add unit test to ensure it works properly.
Remove connect, disconnect and close_error signals, since they are
implied by their respective methods completing and/or throwing an
error. Remove Deserializer pass-through signals, treat all three kinds
as generic receive errors instead.
Make Deserializer emit end-of-stream signal only on EOS, not on EOS and
on receive error, so it only signals an error condition once.
The port to GMime 3 missed setting the Message-Id header on the
underlying GMime Message object when constructing a message, from a
ComposedEmail, so this was not getting set on outoging email.
Fixes#758
Also handle continuation of cleanup after old messages have been
detached. Flagged vacuuming is performed even when the cleanup
interval hasn't been reached. The tracking of last background
cleanup time in Account.Information is possibly temporary and isn't
yet persisted.
The only reason SearchFolder.EmailIdentifier exists was to store the
date for ordering the folder, but that can be done with any old class,
meaning we can simply pass though existing ImapDb ids to clients, fixing
a lot of bugs and corner cases along the way.