Skip to content

Commit f6a21ee

Browse files
committed
fix: fix URL creation for the EmailClient
1 parent eae4ed9 commit f6a21ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/email_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl EmailClient {
4646
html_content: &str,
4747
text_content: &str,
4848
) -> Result<(), reqwest::Error> {
49-
let url = self.base_url.join("/email");
49+
let url = self.base_url.join("/email").expect("Invalid email URL.");
5050
let request_body = SendEmailRequest {
5151
from: self.sender.as_ref(),
5252
to: recipient.as_ref(),
@@ -56,7 +56,7 @@ impl EmailClient {
5656
};
5757
let _builder = self
5858
.http_client
59-
.post(url.unwrap())
59+
.post(url)
6060
.header(
6161
"X-Postmark-Server-Token",
6262
self.authorization_token.expose_secret(),

0 commit comments

Comments
 (0)