Skip to content
This repository has been archived by the owner on Dec 14, 2024. It is now read-only.

Commit

Permalink
feat: Add smtp_port field in request for validation through differe…
Browse files Browse the repository at this point in the history
…nt port (#233)

* feat: Add `smtp_port` field in request for validation through different port

* bump version
  • Loading branch information
amaury1093 authored Oct 11, 2021
1 parent 95b062b commit ea6b3fc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "reacher_backend"
version = "0.3.11"
version = "0.3.12"
edition = "2018"
license = "AGPL-3.0"
publish = false
Expand Down
5 changes: 5 additions & 0 deletions src/routes/check_email/post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pub struct EndpointRequest {
from_email: Option<String>,
hello_name: Option<String>,
proxy: Option<CheckEmailInputProxy>,
smtp_port: Option<u16>,
to_email: String,
}

Expand Down Expand Up @@ -87,6 +88,10 @@ async fn create_check_email_future(
input.set_proxy(proxy_input);
}

if let Some(smtp_port) = body.smtp_port {
input.set_smtp_port(smtp_port);
}

input.set_smtp_timeout(Duration::from_secs(SMTP_THRESHOLD));

// Retry each future twice, to avoid grey-listing.
Expand Down

0 comments on commit ea6b3fc

Please sign in to comment.