Mailspring/packages/isomorphic-core/src
Karim Hamidou b1ba489065 Revert "Revert "[feat] Add support for send later""
Arc land messed up and landed a not fully merged branch. (Seriously – I
had merged a copy of my branch with master to see how easy it would be.
Because I didn't want to merge the whole thing, I blindly committed my
changes and switched back to my real branch). To my great surprise, arc
decided to use the wrong branch when landing it.

Original commit message:

Summary:
    Finally, here it is! Send later, with support for open tracking but
without support for attachments yet. It took me some time to find the
right way to do things.

    **The send later dilemna**

    There's two ways we could handle send later:
    1. do everything on the client
    2. process the message in the cloud

    1. is very tempting because it would make the cloud server very
simple. Unfortunately, it has some serious limitations, for example,
setting the "Date" message header. That's why I chose to go with 2. When
a user presses the "Send Later" button, we save the open/link tracking
metadata and fills in all the required fields. I added a custom endpoint
to the K2 API to do this, `/drafts/build`. After that, we save the JSON
contents of the message as metadata.

    When we process metadata, we simply create a MIME message from the
JSON and send it.

    **Limitations**

    Right now, send later doesn't support and attachments. There's also
some minor code duplication which needs to be refactored away.

Test Plan: Tested manually. Checked that regular send still worked, too.

Reviewers: mark, spang, halla, juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D4054
2017-03-07 17:21:29 -08:00
..
migrations [💄] fix eslint issues before they get overwhelming 2016-12-01 15:37:48 -08:00
models Revert "Revert "[feat] Add support for send later"" 2017-03-07 17:21:29 -08:00
auth-helpers.js [iso-core] Fix Office365 sending from the mail app 2017-02-21 15:59:12 -08:00
backoff-schedulers.es6 [*] Move BackoffSchedulers into isomorphic-core 2017-02-17 10:11:35 -08:00
database-types.js [local-sync] Report folder syncState to N1 2016-12-15 11:08:20 -08:00
delta-stream-builder.js [cloud-api] DONT Timeout streaming API connections every 15 minutes anymore 2017-02-23 11:56:31 -08:00
env-helpers.es6 [*] metrics(Part 1) Add env-helpers to iso core 2017-02-17 13:34:07 -08:00
errors.js [iso-core] fix error toJSON in node environments 2017-02-17 17:31:36 -08:00
hook-increment-version-on-save.js [*] fix(deltas): Cloud-API not filtering deltas at all, refactor a few things 2016-12-01 18:41:46 -08:00
hook-transaction-log.js [local-sync] Sync draft flag from provider to K2 & exclude drafts from Edgehill 2017-01-23 20:58:32 -08:00
imap-box.es6 [iso-core] Fix typo in IMAPBox 2017-02-28 11:16:37 -08:00
imap-connection-pool.es6 [iso-core] 🎨 Rename imap-pool.es6 to imap-connection-pool 2017-03-02 14:45:34 -08:00
imap-connection.es6 [iso-core] Fix IMAPConnection.openBox 2017-03-01 17:19:21 -08:00
imap-errors.js [iso-core] Loosen checks for detecting retryable errors + add new one 2017-02-28 10:00:12 -08:00
load-models.js [local-sync] add attachments 2017-01-05 16:33:38 -08:00
message-factory.es6 Revert "Revert "[feat] Add support for send later"" 2017-03-07 17:21:29 -08:00
metrics-reporter.es6 [*] Fixup MetricsReporter 2017-02-22 16:36:29 -08:00
promise-utils.js [💄] fix eslint issues before they get overwhelming 2016-12-01 15:37:48 -08:00
send-utils.es6 Revert "Revert "[feat] Add support for send later"" 2017-03-07 17:21:29 -08:00
sendmail-client.es6 Revert "Revert "[feat] Add support for send later"" 2017-03-07 17:21:29 -08:00