Closed louiszgn closed 2 years ago
That is not possible the 450 Error is something provided by the smtp server (it can't resolve the DNS or didn't found a MX entry etc) and the smtp server doesn't know if xxx@gmail.com
exits.
In the return email indicating that this email does not exist, this error is displayed :
Diagnostic-Code: smtp; 550 5.1.1 <XXXX@gmail.com>: Recipient address rejected: User unknown
We can see here that the code 550 exist for smtp
Yes that is expected. But at mail creation this is not known.
Okay I see. Do you know how we can get this info then?
I found https://github.com/reacherhq/check-if-email-exists that actually can do it. (is rust based I never written a single line rust so I will not look deeply into it)
The question is what should happen if in to
we have 100
mails and 1 is not vaild. I don't think the complete mail should be garbage. Or should it?
My idea would be to add a constructor option "mail filter" where you can provide a callback that runs for each mail in to, cc and bcc and returns 'OK', 'REMOVE' or 'FAIL' depending on if it should be removed or if the complete mail sending should be prevented. (maybe also allow Promise<'OK'|'REMOVE'|'FAIL'> as return type) that would allow users to add:
Hello 👋 I was trying to retrieve the responses from the smtp server when I noticed that the one from the dependency does not match the one I get. Would you know why?
The response I get :
The response the dependency get :
┌───────┬────────────────────────────────┐
│ (idx) │ Values │
├───────┼────────────────────────────────┤
│ 0 │ "RCPT" │
│ 1 │ "TO:" │
│ 2 │ "<knkldfnlkmdsnqkj@gmail.com>" │
└───────┴────────────────────────────────┘
250 2.1.5 Ok
Not shure. How do you created the first response?
I followed these instructions but with gmail.com
The second one (with denomailer) was with the same SMTP server?
I'm not sure...
I basicly want to change the behavior so that a wrong E-Mail don't prevent sending so I will change that handling in the future.
(some links for me) https://www.iana.org/assignments/smtp-enhanced-status-codes/smtp-enhanced-status-codes.xhtml http://cloud.siegnetz.de/services/smtp-status-codes/ https://en.wikipedia.org/wiki/List_of_SMTP_server_return_codes
Just to clarify.
Is it possible to check if destination email exists if your email account belongs to the same service as the destination email.
Example in which is possible:
You log in with you gmail account, to a gmail server and try to send mail to a gmail account that does not exist.
Example in which is not possible:
You log in with you gmail account, to a gmail server and try to send to mail to a yahoo account that does not exist. There is no way for a gmail server to check its own database for a yahoo email account. As a result, it will dispatch the email only to have yahoo bounce the message back as undeliverable.
You may now close this issue as there is no work around. It's not a problem. You've just misunderstood its workflow.
Currently when a Domain doesn't exist, this error is returned :
Error: 450: 4.1.2 <XXXXX@XXXXX.XXX>: Recipient address rejected: Domain not found
But if the email has an existing domain, even if this email does not exist, nothing happen.
Why not also return a similar error? For example :
Error: 550: 5.1.1 <XXXXX@gmail.com>: Recipient address rejected: Email not found