check-if-email-exists
check-if-email-exists copied to clipboard
Allow verifying multiple emails in one SMTP connection
Assume we get as input to the main function something like a Vec<&str>
, with all emails in the same domain. Is it possible to verify multiple emails on that same domain?
In this case, we should just call email_deliverable
multiple times, using the same smtp_client
, to avoid too many connections.
https://github.com/amaurymartiny/check_if_email_exists/blob/f8acd1ee61a3f7fefe2b1af93d744bb3a9d9095a/core/src/smtp.rs#L219-L239
I'm really new to rust, but I could maybe try this. I'm not quite understanding step 1 though. Is it already calling email_deliverable
multiple times whenever it checks dilverability
?
Nice! That'd be great.
Is it already calling email_deliverable multiple times whenever it checks dilverability?
Yes exactly, it just means, at line 229 above, call the email_deliverable
function multiple times. But we shouldn't create a new connection each time, just use the same smtp_client
.
So step 1 is actually probably 90% of this issue, I'm not sure dividing it into 2 steps was actually clever 😄
@redoxeon Have you done some progress implementing this yet?
Can I try to implement this feature?
Also, @amaurymartiny , do I understand you right, that all API that accepts params like to_email: &str, from_email: &str
must now accept something like Vec<(&str, &str)>
?
that all API that accepts params like to_email: &str, from_email: &str must now accept something like Vec<(&str, &str)>
I was initially thinking to_email: Vec<&str>, from_email: &str
(from_email is not really important), but yeah, Vec<(&str, &str)>
is even more customizable.
@WaffleLapkin I haven't gotten very far on this at all, so if you beat me at it, that'd be totally fine :)
hey,did you get around to implementing it?
Nope, never implemented this. I guess this is a good hacktoberfest issue, if you want to tackle it.