-
Can you help me understand what will happen in the following use cases when the server recognizes that an email address is not valid because the recipient is not accepted. Use Case 1
I believe a SmptCommandException will be thrown. If that's true, should I assume that the valid addresses did not get the email? Use Case 2
I believe an exception will be thrown but if it's a SmptCommandException ex, then will the ex.Mailbox.Address equal the notValidAddress1 value and there won't be any reference to the notValidAddress2 value? In this comment, @jstedfast states that an exception gets thrown for the first recipient that fails but does not mention if valid email addresses will still get the email. His response also implies that only the first failed address is referenced in the exception. This makes me think that no further processing is done but I'm not sure. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You're asking a more complicated question than you realize because it "all depends" (on the server). Use Case 1
Assuming that the server rejects the email address outright, then yes. If it doesn't, then no. Instead, what will happen is that you'll get a delivery failure email message to the sender account telling you it failed to deliver the message. Use Case 2
Assuming that the server rejects the email address outright, then yes. If it doesn't, then no. Instead, what will happen is that you'll get a delivery failure email message for each of the invalid recipients to the sender account telling you it failed to deliver the messages.
The way that the SMTP protocol works is that the client sends multiple commands to send a message.
That should clear a lot of things up for you. Keep in mind that the server won't necessarily do a lookup of any of the recipient addresses (but it might check that the domains exist) during the |
Beta Was this translation helpful? Give feedback.
You're asking a more complicated question than you realize because it "all depends" (on the server).
Use Case 1
Assuming that the server rejects the email address outright, then yes. If it doesn't, then no. Instead, what will happen is that you'll get a delivery failure email message to the sender account telling you it failed to deliver the message.
Use Case 2