mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-20 07:01:12 +00:00
increase smtp timeout (#87)
This commit is contained in:
parent
e8ae4b025f
commit
926f476194
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- SMTP timeout [#87]
|
||||||
|
|
||||||
## [0.2.5] - 2021-04-12
|
## [0.2.5] - 2021-04-12
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -153,4 +157,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
[#75]: https://github.com/soywod/himalaya/issues/75
|
[#75]: https://github.com/soywod/himalaya/issues/75
|
||||||
[#79]: https://github.com/soywod/himalaya/issues/79
|
[#79]: https://github.com/soywod/himalaya/issues/79
|
||||||
[#83]: https://github.com/soywod/himalaya/issues/83
|
[#83]: https://github.com/soywod/himalaya/issues/83
|
||||||
|
[#87]: https://github.com/soywod/himalaya/issues/87
|
||||||
[#89]: https://github.com/soywod/himalaya/issues/89
|
[#89]: https://github.com/soywod/himalaya/issues/89
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
use error_chain::error_chain;
|
use error_chain::error_chain;
|
||||||
use lettre::{self, transport::smtp::SmtpTransport, Transport};
|
use lettre::{self, transport::smtp::SmtpTransport, Transport};
|
||||||
|
|
||||||
|
@ -21,6 +23,7 @@ pub fn send(account: &Account, msg: &lettre::Message) -> Result<()> {
|
||||||
|
|
||||||
smtp_relay(&account.smtp_host)?
|
smtp_relay(&account.smtp_host)?
|
||||||
.credentials(account.smtp_creds()?)
|
.credentials(account.smtp_creds()?)
|
||||||
|
.timeout(Some(Duration::new(1000, 0)))
|
||||||
.build()
|
.build()
|
||||||
.send(msg)?;
|
.send(msg)?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue