Reputation: 1712
In our application we send email to user of applications. When our user email address is like [email protected]@company, it fails with exception of system.net.mime.mailbnfhelper.readmailaddress
So can a email address have multiple '@' symbol and can .net MailMessege object handle it?
Upvotes: 4
Views: 4379
Reputation: 234584
No, that's not a valid e-mail address. See RFC-5322, section 3.4.1 and section 3.2.3 for the lists of characters allowed in each of the parts (the definition of the atoms).
In order to have multiple '@' symbols you need to use quoted strings. Apparently MailAddress
does not support these (but does not document it). I'm running .NET 3.5 on a Win7 machine and MailAddress
throws a FormatException
when fed one of these.
Upvotes: 6
Reputation: 9864
It is possible to have few @ signs, but you have to put other one in quotes.
Upvotes: 4