diff --git a/lettre/Cargo.toml b/lettre/Cargo.toml index c51a59f..b23ce8d 100644 --- a/lettre/Cargo.toml +++ b/lettre/Cargo.toml @@ -23,7 +23,7 @@ log = "^0.4" nom = { version = "^4.0", optional = true } bufstream = { version = "^0.1", optional = true } native-tls = { version = "^0.2", optional = true } -base64 = { version = "^0.9", optional = true } +base64 = { version = "^0.10", optional = true } hostname = { version = "^0.1", optional = true } serde = { version = "^1.0", optional = true } serde_json = { version = "^1.0", optional = true } diff --git a/lettre/src/smtp/client/mod.rs b/lettre/src/smtp/client/mod.rs index c2c1843..315a78a 100644 --- a/lettre/src/smtp/client/mod.rs +++ b/lettre/src/smtp/client/mod.rs @@ -254,7 +254,13 @@ impl InnerClient { break; } // TODO read more than one line - self.stream.as_mut().unwrap().read_line(&mut raw_response)?; + let read_count = self.stream.as_mut().unwrap().read_line(&mut raw_response)?; + + // EOF is reached + if read_count == 0 { + break; + } + response = raw_response.parse::(); } diff --git a/lettre_email/Cargo.toml b/lettre_email/Cargo.toml index 2204fd7..8eb0130 100644 --- a/lettre_email/Cargo.toml +++ b/lettre_email/Cargo.toml @@ -28,6 +28,6 @@ mime = "^0.3" time = "^0.1" uuid = { version = "^0.7", features = ["v4"] } lettre = { version = "^0.9", path = "../lettre", default-features = false } -base64 = "^0.9" +base64 = "^0.10" failure = "^0.1" failure_derive = "^0.1"