Commit Graph

24 Commits

Author SHA1 Message Date
Friedel Ziegelmayer
014d2946b2 feat: use EventEmitter for events 2020-05-22 21:03:01 +02:00
dignifiedquire
8a7923c974 Merge remote-tracking branch 'origin/master' into feat/async-jobs 2020-05-13 18:29:22 +02:00
Alexander Krotov
c36227e2fc Better SMTP ErrorNetwork message
It uses stock string, just as for IMAP errors, and is distinguishable
from IMAP errors: protocol is specified in the error message now.
2020-05-10 23:24:03 +03:00
Hocuri
711f3f69da Emit an event when SMTP fails (the same is already done for IMAP) 2020-04-12 18:17:24 +03:00
Friedel Ziegelmayer
24f4cbbb27 refactor: replace failure
- failure is deprecated
- thiserror for deriving Error impl
- anyhow for highlevel error handling
2020-04-10 22:39:28 +02:00
dignifiedquire
aa45716ef7 cleanup and setup configure 2020-03-18 00:36:13 +01:00
dignifiedquire
ce5b95f8e5 start setting up new scheduler 2020-03-17 13:48:03 +01:00
dignifiedquire
818e921192 it compiles 2020-03-14 15:17:47 +01:00
dignifiedquire
43a8828430 asyncify smtp thread state handling 2020-03-14 15:16:27 +01:00
dignifiedquire
618202cf8b more async 2020-03-14 15:16:27 +01:00
holger krekel
0ac0eeda34 better naming, less code 2020-02-20 01:30:21 +01:00
holger krekel
4b6963122b Update src/smtp/mod.rs
Co-Authored-By: Alexander Krotov <ilabdsf@gmail.com>
2020-02-20 01:30:21 +01:00
holger krekel
0b0ed56901 directly attempt to re-connect if the smtp connection is maybe stale
also refactor performing the job-action into own function
2020-02-20 01:30:21 +01:00
dignifiedquire
a8fa644d25 feat: update to latest async-imap 2020-01-28 17:44:34 +03:00
B. Petersen
7f6a1ad1a7 add some empty lines to enums & co to make things more readable and to avoid errors this way :) 2019-12-20 12:55:42 +01:00
Alexander Krotov
7ef22f2940 fix(smtp): reduce SMTP I/O timeout to 30 seconds
15 minute timeout was used because it applied to the whole send()
operation. Now timeout applies to each I/O operation, such as read()
or write(), so it can be made much shorter. In particular, this timeout
applies to read() call right after connection to plain or STARTTLS server,
in which case it is not reasonable to wait 15 minutes to receive one
line of data.

The timeout is triggered only if no progress is made within 30 seconds. It
likely indicates a network failure anyway.
2019-12-19 06:55:19 +01:00
dignifiedquire
2398454838 feat(smtp): update to use async-smtp based timeouts 2019-12-18 03:08:59 +03:00
Alexander Krotov
ccc190f991 Switch to native_tls 2019-12-13 11:03:46 +01:00
holger krekel
93e8cca02f remove redundant state from smtp 2019-12-08 23:04:08 +01:00
Alexander Krotov
54eb30f3db Switch from lettre to async-smtp 2019-12-08 21:00:03 +01:00
Alexander Krotov
339c0d3dc7 Remove unnecessary use of failure::Fail 2019-12-06 10:34:34 +01:00
Alexander Krotov
ad87b7c4a5 Fix clippy warnings 2019-12-03 20:20:52 +03:00
Alexander Krotov
e22b4e8430 Use map_err in Smtp.connect() instead of match 2019-12-03 13:35:55 +03:00
Alexander Krotov
7223a36a71 SMTP error refactoring 2019-12-01 18:24:26 +01:00