Petr Hanousek writes:
sometimes someone here mistypes the mail address of Requestor or CC. The
typos in addresses are various, my question is about the really obvious
ones. Like if you put to CC an address “a@b”. Is there any mechanism in
RT to detect such mistakes and say something at least? Or can I have a
feature request for this?
If you try this in Gmail or Thunderbird, an error is raised and the
message is not sent.
It indicates the ‘most’ official regex is:
Yeah. Quite a mouthful. This is because there are quite a few ways to express email addresses. And even this is not foolproof.
The same page also has other simpler regex expressions that work a fair amount of the time, but are less complicated, like:
The page claims it is 99% effective.
That, however, does not solve your problem. Just because it is formulated correctly does not mean it is a valid address.
The usual solution is to whitelist the addresses and do a lookup. Any address not found gets added tentatively, but flagged for testing. You can also at this time prompt for acceptance vs. going back to an edit screen. This does require you maintain a list of valid email addresses somewhere. The user list is a likely place, but if you are sending emails to people who are not users, then that fails.
The information contained in this e-mail is for the exclusive use of the
intended recipient(s) and may be confidential, proprietary, and/or
legally privileged. Inadvertent disclosure of this message does not
constitute a waiver of any privilege. If you receive this message in
error, please do not directly or indirectly use, print, copy, forward,
or disclose any part of this message. Please also delete this e-mail
and all copies and notify the sender. Thank you.