4 ms·
The local part of an email address can also contain spaces if in quotes: "John Smith"@example.com In fact, the local part is a set of elements separated by
by hlandau 6y ago
The local part of an email address can also contain spaces if in quotes:
"John Smith"@example.com
In fact, the local part is a set of elements separated by dots, each of which can be quoted. The following is valid:
"John Smith@example.com".foo."John Smith".!$%^&*/@example.com
Of course, barely anything supports this.
- the_jeremy 6y agoWith SMTPUTF8, you can do pretty much anything, including emoji in email addresses. Not much supports this, either.
- hundchenkatze 6y agoHandling comments in emails is fun too! Pete(A nice \) chap) <pete(his account)@silly.test(his host)> https://tools.ietf.org/html/rfc5322#appendix-A.5 https://tools.ietf.org/html/rfc5322#appendix-A.5
- dathinab 6y agoNote that comments are only valid in mail headers, but not smtp. Generally even besides CFWS related differences there are some differences in between which email addresses SMTP allows and which are allowed in mail headers.... Lastly given that quoting in the local part as well as some special forms of the domain part are not supported by most programs it's often sensible to reject them, i.e. treat them as invalid even through technically they are not. (But you really should support internationalized mails!)
- ChrisSD 6y agoThe format of an email address is: [whatever the server accepts]@[valid domain name] No more, no less. Although "server" here also includes anything in-between that may barf on a local part or (sometimes) even a domain name it doesn't like. For example, some forms don't like emails to top level domains.
- mercurywells 6y agoWhat about user@[127.0.0.1] (with the brackets)
- deleted 6y ago[deleted]
- 411111111111111 6y agoDon't the brackets mean that it's a ipv6 address? I would've thought it's invalid, because the ip isnt colon separated. (Just guessing here)
- cbhl 6y agoThere are various schemes for mapping IPv4 addresses in the IPv6 address space, for example [::ffff:127.0.0.1] [64:ff9b::127.0.0.1] https://en.wikipedia.org/wiki/IPv6_address#Special_addresses https://en.wikipedia.org/wiki/IPv6_address#Special_addresses
- firethief 6y agoYou may be thinking of URLs. The host specification differs between the two standards^H^H^H^H^H^H conventions.
- jcranmer 6y agoIn the email addressing standard (RFC 5321), the brackets means it's an IP address literal. If you add in an IPv6 tag (e.g., [IPv6:1::1]), you get IPv6 support as well.
- deleted 6y ago[deleted]
- ChrisSD 6y agoAh yes, you can use an IP address instead of a domain! I'd completely forgotten about that because nowadays it's so very unlikely to work with anything.
- jsjohnst 6y ago> Of course, barely anything supports this. Yahoo! Mail always has supported a space in the local part because David Filo wanted to ensure it was supported. His @yahoo.com email address had a space in it to ensure that he’d know if it was ever broken.
- mikestew 6y agoOf course, barely anything supports this. And for good reason. Were I in charge of the project budget, I wouldn't be blowing good dev money on implementing some RFC circle-jerk that no real user will ever use except in a geek pissing contest. Our collective Venn diagrams of what an email address "ought to look like" have a big enough intersection that we can probably do without such silliness.