jmarnold / EmbeddedMail

Integration testing against e-mail almost always sucks. EmbeddedMail doesn't remove all of that pain, but it certainly helps it suck less by providing an in-memory SMTP server that you can assert on.
http://nuget.org/packages/EmbeddedMail
Other
25 stars 4 forks source link

Purpose of sending new GUID to client after receiving message body #9

Open TysonMN opened 5 years ago

TysonMN commented 5 years ago

After receiving the body of a message, what is the purpose of creating a new GUID and sending it to the client?

session.WriteResponse(string.Format("250 Ok: queued as {0}", Guid.NewGuid()));

If this GUID were sent more than once or added to the metadata of the received message, then this would make more sense to me. But in its current form, this code is essentially sending random data to the client (unless you consider how the GUID is generated and try to parse out the non-unique parts...which is not a good idea).

jmarnold commented 5 years ago

I doubt this was really thought out, lol. I don't remember why I did it.

TysonMN commented 5 years ago

I can't think of any benefit. I recommend removing it.