check-if-email-exists icon indicating copy to clipboard operation
check-if-email-exists copied to clipboard

Allow verifying multiple emails in one SMTP connection

Open amaury1093 opened this issue 5 years ago • 7 comments

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

amaury1093 avatar Sep 30 '19 20:09 amaury1093

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?

redoxeon avatar Oct 01 '19 16:10 redoxeon

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 😄

amaury1093 avatar Oct 01 '19 21:10 amaury1093

@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)>?

WaffleLapkin avatar Oct 11 '19 15:10 WaffleLapkin

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.

amaury1093 avatar Oct 11 '19 15:10 amaury1093

@WaffleLapkin I haven't gotten very far on this at all, so if you beat me at it, that'd be totally fine :)

redoxeon avatar Oct 14 '19 15:10 redoxeon

hey,did you get around to implementing it?

3sigma-devops avatar Oct 11 '21 13:10 3sigma-devops

Nope, never implemented this. I guess this is a good hacktoberfest issue, if you want to tackle it.

amaury1093 avatar Oct 11 '21 13:10 amaury1093