fix smtp port (#94)

* Respect smtp port when sending email

(cherry picked from commit ef89cbd30296389b7d363ecbb03080081304d98e)

* smtp: remove explicit timeout

Also remove redundant variable
This commit is contained in:
Sridhar Ratnakumar 2021-04-13 10:44:24 -04:00 committed by GitHub
parent 926f476194
commit 647c0c25ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,8 +22,8 @@ pub fn send(account: &Account, msg: &lettre::Message) -> Result<()> {
};
smtp_relay(&account.smtp_host)?
.port(account.smtp_port)
.credentials(account.smtp_creds()?)
.timeout(Some(Duration::new(1000, 0)))
.build()
.send(msg)?;