fix(transport): return whole smtp error string (#821)

We were only returning the first line of the error message,
but that may not be enough to get the whole context of the error.
Since we have already parsed the response, just return the whole error
to the user.

Related to #694
This commit is contained in:
André Cruz
2022-09-22 15:30:04 +01:00
committed by GitHub
parent d4da2e1f14
commit a3fcdf263d
2 changed files with 2 additions and 2 deletions

View File

@@ -317,7 +317,7 @@ impl AsyncSmtpConnection {
} else {
Err(error::code(
response.code(),
response.first_line().map(|s| s.to_owned()),
Some(response.message().collect()),
))
}
}

View File

@@ -285,7 +285,7 @@ impl SmtpConnection {
} else {
Err(error::code(
response.code(),
response.first_line().map(|s| s.to_owned()),
Some(response.message().collect()),
))
};
}