Repository: lettre/lettre (language: rust)

Issue:
Random "The connection is already established" error
**Describe the bug**
While our application is running, it suddenly returns an `Error::Client("The connection is already established")` error when sending an email. Once this error happens, every attempt to send an email fails and the only way to fix the issue is to restart the application

**To Reproduce**
Here an extract from our configuration:
```rust
/// This is inside an 'EmailService'. A single instance of the EmailService is used across the entire application
        let mailer =  {
            let server_address = "127.0.0.1";
            let server_port = 2525;

            let tls_builder = TlsConnector::builder();
            let tls_connector = tls_builder.build().unwrap();
            let tls_parameters = ClientTlsParameters::new(server_address.to_owned(), tls_connector);
            let security = ClientSecurity::Wrapper(tls_parameters);

            let smtp_client = SmtpClient::new((server_address, server_port), security).unwrap();

            let transport = smtp_client.connection_reuse(ConnectionReuseParameters::ReuseUnlimited).transport();

            Arc::new(Mutex::new(transport))

        };

/// this is an extract of how the global mailer in the EmailService is used to send the email:
        {
            let mut mailer = mailer.lock();
            let email = SendableEmail::new(
                Envelope::new(
                    Some(EmailAddress::new("from@gmail.com".to_string()).unwrap()),
                    vec![EmailAddress::new("to@example.com".to_string()).unwrap()],
                )
                    .unwrap(),
                "id".to_string(),
                "Hello example".to_string().into_bytes(),
            );

            // SOMETIMES, HERE WE GET A Error::Client("The connection is already established")
            mailer.send(email).unwrap();
        }
```

**Expected behavior**
The connection is managed internally to the mailer; so, we expected the mailer to properly handle it.

**Environment (please complete the following information):**
- Lettre version: 
  ```toml
  lettre = { version = "0.9" , features = ["smtp-transport"] }
  native-tls = { version = "0.2", features = ["vendored"] }
  ```
- OS: the application runs inside an `alpine:3.11` Docker image

**Additional context**
Could this be caused by this line `smtp_client.connection_reuse(ConnectionReuseParameters::ReuseUnlimited).transport();`?



Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 33ff699d7..7c7353746 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,7 @@ Several breaking changes were made between 0.9 and 0.10, but changes should be s
 * Refactor `TlsParameters` implementation to not expose the internal TLS library
 * `FileTransport` writes emails into `.eml` instead of `.json`
 * When the hostname feature is disabled or hostname cannot be fetched, `127.0.0.1` is used instead of `localhost` as EHLO parameter (for better RFC compliance and mail server compatibility)
+* The `sendmail` and `file` transports aren't enabled by default anymore.
 * The `new` method of `ClientId` is deprecated
 * Rename `serde-impls` feature to `serde`
 * The `SendmailTransport` now uses the `sendmail` command in current `PATH` by default instead of
diff --git a/Cargo.toml b/Cargo.toml
index 5f4f7e356..6b871589c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
 [package]
 name = "lettre"
 # remember to update html_root_url and README.md (Cargo.toml example and deps.rs badge)
-version = "0.10.0-rc.7"
+version = "0.10.0"
 description = "Email client"
 readme = "README.md"
 homepage = "https://lettre.rs"
diff --git a/README.md b/README.md
index 42114fa18..b2eacd4cb 100644
--- a/README.md
+++ b/README.md
@@ -28,27 +28,14 @@
 </div>
 
 <div align="center">
-  <a href="https://deps.rs/crate/lettre/0.10.0-rc.7">
-    <img src="https://deps.rs/crate/lettre/0.10.0-rc.7/status.svg"
+  <a href="https://deps.rs/crate/lettre/0.10.0">
+    <img src="https://deps.rs/crate/lettre/0.10.0/status.svg"
       alt="dependency status" />
   </a>
 </div>
 
 ---
 
-**NOTE**: this readme refers to the 0.10 version of lettre, which is
-in release candidate state. Use the [`v0.9.x`](https://github.com/lettre/lettre/tree/v0.9.x)
-branch for the previous stable release.
-
-0.10 is already widely used and is already thought to be more reliable than 0.9, so it should generally be used
-for new projects.
-
-We'd love to hear your feedback about 0.10 design and APIs before final release!
-Start a [discussion](https://github.com/lettre/lettre/discussions) in the repository, whether for
-feedback or if you need help or advice using or upgrading lettre 0.10.
-
----
-
 ## Features
 
 Lettre provides the following features:
@@ -63,15 +50,20 @@ Lettre does not provide (for now):
 
 * Email parsing
 
+## Supported Rust Versions
+
+Lettre supports all Rust versions released in the last 6 months. At the time of writing
+the minimum supported Rust version is 1.56, but this could change at any time either from
+one of our dependencies bumping their MSRV or by a new patch release of lettre.
+
 ## Example
 
 This library requires Rust 1.56.0 or newer.
 To use this library, add the following to your `Cargo.toml`:
 
-
 ```toml
 [dependencies]
-lettre = "0.10.0-rc.7"
+lettre = "0.10"
 ```
 
 ```rust,no_run
diff --git a/src/lib.rs b/src/lib.rs
index 93be8119a..791aa8f4b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -100,7 +100,7 @@
 //! [mime 0.3]: https://docs.rs/mime/0.3
 //! [DKIM]: https://datatracker.ietf.org/doc/html/rfc6376
 
-#![doc(html_root_url = "https://docs.rs/crate/lettre/0.10.0-rc.7")]
+#![doc(html_root_url = "https://docs.rs/crate/lettre/0.10.0")]
 #![doc(html_favicon_url = "https://lettre.rs/favicon.ico")]
 #![doc(html_logo_url = "https://avatars0.githubusercontent.com/u/15113230?v=4")]
 #![forbid(unsafe_code)]


Test patch: