deep-email-validator icon indicating copy to clipboard operation
deep-email-validator copied to clipboard

Mailbox not found.

Open sfarkas1988 opened this issue 7 months ago • 0 comments

Can I somehow pass a custom smtp server for an email address?

I suppose the 3rd parameter exchange should be changeable when running validate():

https://github.com/mfbx9da4/deep-email-validator/blob/8bbd9597a7ce435f0a77889a45daccdd5d7c3488/src/smtp/smtp.ts#L11C68-L11C76

In java, retrieving the SMTP Server works like this:

public boolean isMXRecordValid(String email) { String domain = email.substring(email.indexOf('@') + 1); try { this.records = new Lookup(domain, Type.MX).run(); return this.records != null && this.records.length > 0; } catch (Exception e) { return false; } }

So I suppose when I get Mailbox not found error, the wrong smtp Server is used to connect.

Thank you in advance

sfarkas1988 avatar Jul 29 '24 22:07 sfarkas1988