Skip to content

Commit

Permalink
fix: fix URL creation for the EmailClient
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsavio committed Apr 3, 2024
1 parent eae4ed9 commit f6a21ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/email_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl EmailClient {
html_content: &str,
text_content: &str,
) -> Result<(), reqwest::Error> {
let url = self.base_url.join("/email");
let url = self.base_url.join("/email").expect("Invalid email URL.");
let request_body = SendEmailRequest {
from: self.sender.as_ref(),
to: recipient.as_ref(),
Expand All @@ -56,7 +56,7 @@ impl EmailClient {
};
let _builder = self
.http_client
.post(url.unwrap())
.post(url)
.header(
"X-Postmark-Server-Token",
self.authorization_token.expose_secret(),
Expand Down

0 comments on commit f6a21ee

Please sign in to comment.