Compare commits

..

2 Commits

Author SHA1 Message Date
Alexis Mousset
98fc0cb2f3 Prepare 0.10.0-rc.2 (#624) 2021-05-18 18:12:10 +02:00
Alexis Mousset
0439bab874 fix(builder): Don't include Bcc headers in formatted messages (#623)
fixes #622
2021-05-18 18:03:20 +02:00
4 changed files with 11 additions and 6 deletions

View File

@@ -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.1"
version = "0.10.0-rc.2"
description = "Email client"
readme = "README.md"
homepage = "https://lettre.rs"

View File

@@ -28,8 +28,8 @@
</div>
<div align="center">
<a href="https://deps.rs/crate/lettre/0.10.0-rc.1">
<img src="https://deps.rs/crate/lettre/0.10.0-rc.1/status.svg"
<a href="https://deps.rs/crate/lettre/0.10.0-rc.2">
<img src="https://deps.rs/crate/lettre/0.10.0-rc.2/status.svg"
alt="dependency status" />
</a>
</div>
@@ -71,7 +71,7 @@ To use this library, add the following to your `Cargo.toml`:
```toml
[dependencies]
lettre = "0.10.0-rc.1"
lettre = "0.10.0-rc.2"
```
```rust,no_run

View File

@@ -95,7 +95,7 @@
//! [Tokio 1.x]: https://docs.rs/tokio/1
//! [async-std 1.x]: https://docs.rs/async-std/1
#![doc(html_root_url = "https://docs.rs/crate/lettre/0.10.0-rc.1")]
#![doc(html_root_url = "https://docs.rs/crate/lettre/0.10.0-rc.2")]
#![doc(html_favicon_url = "https://lettre.rs/favicon.ico")]
#![doc(html_logo_url = "https://avatars0.githubusercontent.com/u/15113230?v=4")]
#![forbid(unsafe_code)]

View File

@@ -401,7 +401,7 @@ impl MessageBuilder {
// https://tools.ietf.org/html/rfc5322#section-3.6
// Insert Date if missing
let res = if self.headers.get::<header::Date>().is_none() {
let mut res = if self.headers.get::<header::Date>().is_none() {
self.date_now()
} else {
self
@@ -424,6 +424,10 @@ impl MessageBuilder {
Some(e) => e,
None => Envelope::try_from(&res.headers)?,
};
// Remove `Bcc` headers now the envelope is set
res.headers.remove::<header::Bcc>();
Ok(Message {
headers: res.headers,
body,
@@ -559,6 +563,7 @@ mod test {
let email = Message::builder()
.date(date)
.bcc("hidden@example.com".parse().unwrap())
.header(header::From(
vec![Mailbox::new(
Some("Каи".into()),