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
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
Alexander Krotov
300fff40e3
refactor(smtp): remove unused SendTimeout Error variant
...
It was used when timeout was set on the whole smtp.send() operation.
Now only the operations inside smtp.send() can timeout, and such timeout
errors result in SendError, so SendTimeout is unused.
2019-12-21 08:57:29 +01: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
9000342de8
Get rid of unnecessary "async move" and ".await"
2019-12-16 18:02:50 +01:00
holger krekel
61b47aa0de
try doing an smtp-send timeout
2019-12-16 18:02:50 +01: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
a8e9a1fbe5
Make Smtp.send async
2019-12-08 21:00:03 +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