I have a RegEx for validating email addresses, but I’m really looking to validate a whole From header. Any of these would be valid:
name@domain.com
<name@domain.com>
My Name <name@domain.com>
Is there anything out there that would validate these as valid from headers? I’m going to look in the smtp library 🙂
I couldn’t get the posted response to work, so I’ve been working on this and finally got this one, which seems to work so far. I’m sure it’ll miss/catch something, but it’s working for now.