The Standard for the Format of ARPA Internet Text Messages is located here: https://www.ietf.org/rfc/rfc0822.txt . RFC822 is the number.
A snippet is quoted here:
"Note: For purposes of display, and when passing such structured information to other systems, such as mail protocol services, there must be NO linear-white-space between words that are separated by period (".") or at-sign ("@"). Section 6 is the address specification part that has the pieces you will need.
RFC 2821 is the Simple Mail Transfer Protocol standard (https://www.ietf.org/rfc/rfc2821.txt). From section 2.3.10 and 4.5.3.1 are below.
2.3.10 Mailbox and Address
As used in this specification, an "address" is a character string
that identifies a user to whom mail will be sent or a location into
which mail will be deposited. The term "mailbox" refers to that
depository. The two terms are typically used interchangeably unless
the distinction between the location in which mail is placed (the
mailbox) and a reference to it (the address) is important. An
address normally consists of user and domain specifications. The
standard mailbox naming convention is defined to be "local-
part@domain": contemporary usage permits a much broader set of
applications than simple "user names". Consequently, and due to a
long history of problems when intermediate hosts have attempted to
optimize transport by modifying them, the local-part MUST be
interpreted and assigned semantics only by the host specified in the
domain part of the address.
4.5.3.1 Size limits and minimums
There are several objects that have required minimum/maximum sizes.
Every implementation MUST be able to receive objects of at least
these sizes. Objects larger than these sizes SHOULD be avoided when
possible. However, some Internet mail constructs such as encoded
X.400 addresses [16] will often require larger objects: clients MAY
attempt to transmit these, but MUST be prepared for a server to
reject them if they cannot be handled by it. To the maximum extent
possible, implementation techniques which impose no limits on the
length of these objects should be used.
local-part
The maximum total length of a user name or other local-part is 64
characters.
domain
The maximum total length of a domain name or number is 255
characters.
These documents are the specifications. They were published in 1982 and 2001 respectively.
Pretty much, you need a local-part@domain with no spaces. It can also contain the characters as specified in RFC822.
Hope this helps.
Thanks, Tim.