Skip to content

Commit

Permalink
Add mailersend client and improve EmailAddress behavior
Browse files Browse the repository at this point in the history
Introduced a new email client, mailersend, and made improvements to the functionality of the EmailAddress type. Adjusted the test suite to match these changes and further updated some client traits and functions for better clarity and functionality.

- Added a client for the mailersend service, expanding the flexibility of the utility.
- Enhanced the functionality of the EmailAddress type, providing the ability to pass string literals directly. The change simplifies code and improves readability.
- Updated some client traits and functions for better clarity and expanded functionality.
- Test suite has been updated accordingly to reflect these changes.
  • Loading branch information
amritghimire committed Apr 28, 2024
1 parent 65ae34a commit 2d6cb8b
Show file tree
Hide file tree
Showing 17 changed files with 487 additions and 76 deletions.
147 changes: 143 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ mailersend = ["dep:reqwest"]

[dev-dependencies]
tokio-test = "0.4.4"
wiremock = "0.6.0"

[package.metadata.cargo-udeps.ignore]
normal = ["log"]
Expand All @@ -55,4 +56,4 @@ development = ["tokio-test"]
# document all features
all-features = true
# defines the configuration attribute `docsrs`
rustdoc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Based on the email client you want to support, you need to initialize email conf
```rust
async fn send_email() {
let email = EmailObject {
sender: "[email protected]".to_string(),
sender: "[email protected]",
to: vec![EmailAddress { name: "Mail".to_string(), email: "[email protected]".to_string() }],
subject: "subject".to_string(),
plain: "plain body".to_string(),
Expand Down
Loading

0 comments on commit 2d6cb8b

Please sign in to comment.