Giter VIP home page Giter VIP logo

postmark-rs's People

Contributors

arbfay avatar bittermandel avatar github-actions[bot] avatar kingledion avatar megaconfidence avatar pastjean avatar vojtastanek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

postmark-rs's Issues

send_email_with_template appears gone?

See comment here:
https://github.com/pastjean/postmark-rs/pull/13/files#r1314417921

I tried this code:

let req = SendEmailWithTemplateRequest::builder();

I expected to see this happen: exists/compiles

Instead, this happened:

 --> crates/emailer/src/lib.rs:6:9
  |
6 |         SendEmailWithTemplateRequest,
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `SendEmailWithTemplateRequest` in `api::email`
7 |         TemplateModel,
  |         ^^^^^^^^^^^^^ no `TemplateModel` in `api::email`

I think the ability to send emails with templates was removed, possibly by accident? Seems like the file with the code is there, but the mod and pub use lines were removed.

Where is 0.7.0 coming from?

Postmark 0.7.0 is posted on docs.rs, but I only see tags here on GitHub for 0.6.0. Which branch/commit is 0.7.0 coming from?

Add Templates support

Hey, it's a great crate! Congrats on this ๐Ÿ’ฏ

I'm using the crate, and now am wondering how to use Postmark's templates. Unfortunately, it's not yet supported by this client.

So, first github issue: can we add support for templates?

Unit tests are failing

I tried this code:

cargo test

I expected to see this happen: Unit tests to pass

Instead, this happened: Multiple unit tests failed trying to flatten a string Enum.

Meta

rustc --version --verbose:

rustc 1.68.2 (9eb3afe9e 2023-03-27)
binary: rustc
commit-hash: 9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0
commit-date: 2023-03-27
host: x86_64-unknown-linux-gnu
release: 1.68.2
LLVM version: 15.0.6

Unable to complete queries due to hyper error

I'm opening this issue because I ran into some trouble with manual testing. When I went to test my template changes against the API, using the skipped test, I have been hitting snags with sending any sort of request to the Postmark API.

The manual test in this branch can be run with cargo test --test send_email. I made the test match what is in the package docstrings pretty closely.

The error I am getting back from the .execute() call is:

thread 'send_email' panicked at 'called `Result::unwrap()` on an `Err` value: Client { source: Communication { source: reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.postmarkapp.com")), port: None, path: "/email", query: None, fragment: None }, source: hyper::Error(Connect, "invalid URL, scheme is not http") } } }', tests/send_email.rs:37:10

The error message invalid URL, scheme is not http can be traced to here: https://docs.rs/hyper/latest/src/hyper/client/connect/http.rs.html#285

This error will throw when the scheme is https. I'm not sure what is going on in the middle with reqwest and why it is expecting http, but it should pretty clearly be https to communicate with Postmark.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.