Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ and this project adheres to

<!--## Unreleased-->

## [0.27.0] - 2026-06-27

### Added

- add received_for to inbound email and received event types (https://github.com/resend/resend-rust/pull/74)

## [0.26.1] - 2026-06-18

### Added
Expand Down Expand Up @@ -540,6 +546,7 @@ Disabled `reqwest`'s default features and enabled `rustls-tls`.

Initial release.

[0.27.0]: https://crates.io/crates/resend-rs/0.27.0
[0.26.1]: https://crates.io/crates/resend-rs/0.26.1
[0.26.0]: https://crates.io/crates/resend-rs/0.26.0
[0.25.1]: https://crates.io/crates/resend-rs/0.25.1
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[package]
name = "resend-rs"
version = "0.26.1"
version = "0.27.0"
edition = "2024"

license = "MIT"
Expand Down Expand Up @@ -37,12 +37,12 @@ thiserror = { version = "2.0" }
maybe-async = { version = "0.2.11" }
governor = "0.10.4"
rand = "0.10.1"
getrandom = { version = "0.4.2", features = ["wasm_js"] }
getrandom = { version = "0.4.3", features = ["wasm_js"] }
serde_json = "1.0.150"
mailparse = "0.16.1"

[dev-dependencies]
jiff = { version = "0.2.28", features = ["serde"] }
jiff = { version = "0.2.29", features = ["serde"] }
tokio = { version = "1.52.3", features = [
"macros",
"test-util",
Expand All @@ -53,7 +53,7 @@ scraper = "0.27.0"
regex = "1.12.4"
# Used in examples
axum = "0.8.9"
svix = "1.95.2"
svix = "1.96.1"
http-body-util = "0.1.3"
tokio-shared-rt = "0.1.0"
anyhow = "1.0"
4 changes: 4 additions & 0 deletions src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ pub struct Suppressed {
pub struct Received {
pub bcc: Vec<String>,
pub cc: Vec<String>,
#[serde(default)]
pub received_for: Vec<String>,
pub message_id: String,
pub attachments: Vec<InboundAttachment>,
}
Expand Down Expand Up @@ -797,6 +799,7 @@ mod test {
"to": ["delivered@resend.dev"],
"bcc": [],
"cc": [],
"received_for": ["forwarded@example.com"],
"message_id": "<example+123>",
"subject": "Sending this example",
"attachments": [
Expand Down Expand Up @@ -824,6 +827,7 @@ mod test {
assert!(received.attachments.len() == 1);
assert!(received.cc.is_empty());
assert!(received.bcc.is_empty());
assert_eq!(received.received_for, vec!["forwarded@example.com"]);
} else {
panic!("Wrong parsing");
}
Expand Down
8 changes: 7 additions & 1 deletion src/receiving.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ pub mod types {
pub cc: Vec<String>,
#[serde(default)]
pub reply_to: Vec<String>,
#[serde(default)]
pub received_for: Vec<String>,
pub html: Option<String>,
pub text: Option<String>,
#[serde(default)]
Expand Down Expand Up @@ -445,6 +447,7 @@ mod test {
"bcc": [],
"cc": [],
"reply_to": [],
"received_for": ["forwarded@example.com"],
"message_id": "<111-222-333@email.provider.example.com>",
"raw": {
"download_url": "https://example.com/emails/raw/abc123?signature=xyz789",
Expand All @@ -466,6 +469,9 @@ mod test {

let res = serde_json::from_str::<ListResponse<InboundEmail>>(emails);
assert!(res.is_ok());
assert!(res.unwrap().data.first().unwrap().raw.is_some());
let data = res.unwrap();
let email = data.data.first().unwrap();
assert!(email.raw.is_some());
assert_eq!(email.received_for, vec!["forwarded@example.com"]);
}
}