Remix.run Logo
win311fwg 2 hours ago

> Don't forget RFC 5321!

As long as you don't forget RFC 6531.

> But the RFCs are ignored in practice by all popular mail servers.

While I agree that you can make a compelling case that sending email is the C in CRUD, usually when someone is talking about CRUD they are referring to systems that satisfy all four letters. U violates the spirit of email, and R and D is usually handled independently of the MTA. So what email servers do here is irrelevant. If you go way back up the comment chain you will even see that Postgres was specifically mentioned. Postgres doesn't care what an email server does, but it does care about data consistency.

> Just check for at least one @ sign

That's a valid specification and in practice you are going to want to make that a PBT to ensure that your implementation actually adheres to the specification. You might try testing foo@bar.com, but what about foo\u0040bar.com? Will you think to test it too? Probably not. Will your code handle it correctly? You may be perfect, but when we get out into the general developer population where all kinds of crazy things show up when they start monkeying with your code, the answer is also probably not.

Looking simple isn’t a reason to not use the tools at your disposal, even if many won’t.

> and email the address to test it.

Poor general advice. That is expressly illegal in some jurisdictions.