RFC-compliant email address validation

This test suite comes from Dominic Sayers and is a mix of RFC examples and examples from other validators. Some of these addresses are not RFC822 or RFC2822 compliant, so failures are expected. The RFC3696 validator attempts to validate email addresses on the public internet, so is probably what you care about.


 

Expected

RFC 822

RFC 2822

RFC 3696

Percent correct

-

73%

81%

99%

Number correct

-

167 / 228

185 / 228

227 / 228

Test # 1
first.last@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

first.last@example.com

Valid

Valid

Valid

Valid

Test # 2
1234567890123456789012345678901234567890123456789012345678901234@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

1234567890123456789012345678901234567890123456789012345678901234@example.com

Valid

Valid

Valid

Valid

Test # 3
first.last@sub.do,com
Expected result: Invalid
Comment: Mistyped comma instead of dot (replaces old #3 which was the same as #57)
Source: Rob <bob@bob.com>

first.last@sub.do,com

Invalid

Invalid

Invalid

Invalid

Test # 4
"first\"last"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

"first\"last"@example.com

Valid

Valid

Valid

Valid

Test # 5
first\@last@example.com
Expected result: Invalid
Comment: Escaping can only happen within a quoted string
Source: Dominic Sayers

first\@last@example.com

Invalid

Invalid

Invalid

Invalid

Test # 6
"first@last"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

"first@last"@example.com

Valid

Valid

Valid

Valid

Test # 7
"first\\last"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

"first\\last"@example.com

Valid

Valid

Valid

Valid

Test # 8
x@x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x234
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

x@x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x234

Valid

Valid

Valid

Valid

Test # 9
123456789012345678901234567890123456789012345678901234567890@12345678901234567890123456789012345678901234567890123456789.12345678901234567890123456789012345678901234567890123456789.123456789012345678901234567890123456789012345678901234567890123.example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

123456789012345678901234567890123456789012345678901234567890@12345678901234567890123456789012345678901234567890123456789.12345678901234567890123456789012345678901234567890123456789.123456789012345678901234567890123456789012345678901234567890123.example.com

Valid

Valid

Valid

Valid

Test # 10
first.last@[12.34.56.78]
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

first.last@[12.34.56.78]

Valid

Valid

Valid

Valid

Test # 11
first.last@[IPv6:::12.34.56.78]
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

first.last@[IPv6:::12.34.56.78]

Valid

Valid

Valid

Valid

Test # 12
first.last@[IPv6:1111:2222:3333::4444:12.34.56.78]
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

first.last@[IPv6:1111:2222:3333::4444:12.34.56.78]

Valid

Valid

Valid

Valid

Test # 13
first.last@[IPv6:1111:2222:3333:4444:5555:6666:12.34.56.78]
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

first.last@[IPv6:1111:2222:3333:4444:5555:6666:12.34.56.78]

Valid

Valid

Valid

Valid

Test # 14
first.last@[IPv6:::1111:2222:3333:4444:5555:6666]
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

first.last@[IPv6:::1111:2222:3333:4444:5555:6666]

Valid

Valid

Valid

Valid

Test # 15
first.last@[IPv6:1111:2222:3333::4444:5555:6666]
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

first.last@[IPv6:1111:2222:3333::4444:5555:6666]

Valid

Valid

Valid

Valid

Test # 16
first.last@[IPv6:1111:2222:3333:4444:5555:6666::]
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

first.last@[IPv6:1111:2222:3333:4444:5555:6666::]

Valid

Valid

Valid

Valid

Test # 17
first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888]
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888]

Valid

Valid

Valid

Valid

Test # 18
first.last@x23456789012345678901234567890123456789012345678901234567890123.example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

first.last@x23456789012345678901234567890123456789012345678901234567890123.example.com

Valid

Valid

Valid

Valid

Test # 19
first.last@1xample.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

first.last@1xample.com

Valid

Valid

Valid

Valid

Test # 20
first.last@123.example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

first.last@123.example.com

Valid

Valid

Valid

Valid

Test # 21
123456789012345678901234567890123456789012345678901234567890@12345678901234567890123456789012345678901234567890123456789.12345678901234567890123456789012345678901234567890123456789.12345678901234567890123456789012345678901234567890123456789.1234.example.com
Expected result: Invalid
Comment: Entire address is longer than 256 characters
Source: Dominic Sayers

123456789012345678901234567890123456789012345678901234567890@12345678901234567890123456789012345678901234567890123456789.12345678901234567890123456789012345678901234567890123456789.12345678901234567890123456789012345678901234567890123456789.1234.example.com

Invalid

Valid

Valid

Invalid

Test # 22
first.last
Expected result: Invalid
Comment: No @
Source: Dominic Sayers

first.last

Invalid

Invalid

Invalid

Invalid

Test # 23
12345678901234567890123456789012345678901234567890123456789012345@example.com
Expected result: Invalid
Comment: Local part more than 64 characters
Source: Dominic Sayers

12345678901234567890123456789012345678901234567890123456789012345@example.com

Invalid

Valid

Valid

Invalid

Test # 24
.first.last@example.com
Expected result: Invalid
Comment: Local part starts with a dot
Source: Dominic Sayers

.first.last@example.com

Invalid

Invalid

Invalid

Invalid

Test # 25
first.last.@example.com
Expected result: Invalid
Comment: Local part ends with a dot
Source: Dominic Sayers

first.last.@example.com

Invalid

Invalid

Invalid

Invalid

Test # 26
first..last@example.com
Expected result: Invalid
Comment: Local part has consecutive dots
Source: Dominic Sayers

first..last@example.com

Invalid

Invalid

Invalid

Invalid

Test # 27
"first"last"@example.com
Expected result: Invalid
Comment: Local part contains unescaped excluded characters
Source: Dominic Sayers

"first"last"@example.com

Invalid

Invalid

Invalid

Invalid

Test # 28
"first\last"@example.com
Expected result: Valid
Comment: Any character can be escaped in a quoted string
Source: Dominic Sayers

"first\last"@example.com

Valid

Valid

Valid

Valid

Test # 29
"""@example.com
Expected result: Invalid
Comment: Local part contains unescaped excluded characters
Source: Dominic Sayers

"""@example.com

Invalid

Invalid

Invalid

Invalid

Test # 30
"\"@example.com
Expected result: Invalid
Comment: Local part cannot end with a backslash
Source: Dominic Sayers

"\"@example.com

Invalid

Invalid

Valid

Invalid

Test # 31
""@example.com
Expected result: Invalid
Comment: Local part is effectively empty
Source: Dominic Sayers

""@example.com

Invalid

Valid

Valid

Invalid

Test # 32
first\\@last@example.com
Expected result: Invalid
Comment: Local part contains unescaped excluded characters
Source: Dominic Sayers

first\\@last@example.com

Invalid

Invalid

Invalid

Invalid

Test # 33
first.last@
Expected result: Invalid
Comment: No domain
Source: Dominic Sayers

first.last@

Invalid

Invalid

Invalid

Invalid

Test # 34
x@x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456
Expected result: Invalid
Comment: Domain exceeds 255 chars
Source: Dominic Sayers

x@x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456

Invalid

Valid

Valid

Invalid

Test # 35
first.last@[.12.34.56.78]
Expected result: Invalid
Comment: Only char that can precede IPv4 address is ':'
Source: Dominic Sayers

first.last@[.12.34.56.78]

Invalid

Valid

Valid

Invalid

Test # 36
first.last@[12.34.56.789]
Expected result: Invalid
Comment: Can't be interpreted as IPv4 so IPv6 tag is missing
Source: Dominic Sayers

first.last@[12.34.56.789]

Invalid

Valid

Valid

Invalid

Test # 37
first.last@[::12.34.56.78]
Expected result: Invalid
Comment: IPv6 tag is missing
Source: Dominic Sayers

first.last@[::12.34.56.78]

Invalid

Valid

Valid

Invalid

Test # 38
first.last@[IPv5:::12.34.56.78]
Expected result: Invalid
Comment: IPv6 tag is wrong
Source: Dominic Sayers

first.last@[IPv5:::12.34.56.78]

Invalid

Valid

Valid

Invalid

Test # 39
first.last@[IPv6:1111:2222:3333::4444:5555:12.34.56.78]
Expected result: Invalid
Comment: Too many IPv6 groups (4 max)
Source: Dominic Sayers

first.last@[IPv6:1111:2222:3333::4444:5555:12.34.56.78]

Invalid

Valid

Valid

Invalid

Test # 40
first.last@[IPv6:1111:2222:3333:4444:5555:12.34.56.78]
Expected result: Invalid
Comment: Not enough IPv6 groups
Source: Dominic Sayers

first.last@[IPv6:1111:2222:3333:4444:5555:12.34.56.78]

Invalid

Valid

Valid

Invalid

Test # 41
first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:12.34.56.78]
Expected result: Invalid
Comment: Too many IPv6 groups (6 max)
Source: Dominic Sayers

first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:12.34.56.78]

Invalid

Valid

Valid

Invalid

Test # 42
first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777]
Expected result: Invalid
Comment: Not enough IPv6 groups
Source: Dominic Sayers

first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777]

Invalid

Valid

Valid

Invalid

Test # 43
first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888:9999]
Expected result: Invalid
Comment: Too many IPv6 groups (8 max)
Source: Dominic Sayers

first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888:9999]

Invalid

Valid

Valid

Invalid

Test # 44
first.last@[IPv6:1111:2222::3333::4444:5555:6666]
Expected result: Invalid
Comment: Too many '::' (can be none or one)
Source: Dominic Sayers

first.last@[IPv6:1111:2222::3333::4444:5555:6666]

Invalid

Valid

Valid

Invalid

Test # 45
first.last@[IPv6:1111:2222:3333::4444:5555:6666:7777]
Expected result: Invalid
Comment: Too many IPv6 groups (6 max)
Source: Dominic Sayers

first.last@[IPv6:1111:2222:3333::4444:5555:6666:7777]

Invalid

Valid

Valid

Invalid

Test # 46
first.last@[IPv6:1111:2222:333x::4444:5555]
Expected result: Invalid
Comment: x is not valid in an IPv6 address
Source: Dominic Sayers

first.last@[IPv6:1111:2222:333x::4444:5555]

Invalid

Valid

Valid

Invalid

Test # 47
first.last@[IPv6:1111:2222:33333::4444:5555]
Expected result: Invalid
Comment: 33333 is not a valid group in an IPv6 address
Source: Dominic Sayers

first.last@[IPv6:1111:2222:33333::4444:5555]

Invalid

Valid

Valid

Invalid

Test # 48
first.last@example.123
Expected result: Invalid
Comment: TLD can't be all digits
Source: Dominic Sayers

first.last@example.123

Invalid

Valid

Valid

Invalid

Test # 49
first.last@com
Expected result: Invalid
Comment: Mail host must be second- or lower level
Source: Dominic Sayers

first.last@com

Invalid

Valid

Valid

Invalid

Test # 50
first.last@-xample.com
Expected result: Invalid
Comment: Label can't begin with a hyphen
Source: Dominic Sayers

first.last@-xample.com

Invalid

Valid

Valid

Invalid

Test # 51
first.last@exampl-.com
Expected result: Invalid
Comment: Label can't end with a hyphen
Source: Dominic Sayers

first.last@exampl-.com

Invalid

Valid

Valid

Invalid

Test # 52
first.last@x234567890123456789012345678901234567890123456789012345678901234.example.com
Expected result: Invalid
Comment: Label can't be longer than 63 octets
Source: Dominic Sayers

first.last@x234567890123456789012345678901234567890123456789012345678901234.example.com

Invalid

Valid

Valid

Invalid

Test # 53
"Abc\@def"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: RFC3696 (February 2004)

"Abc\@def"@example.com

Valid

Valid

Valid

Valid

Test # 54
"Fred\ Bloggs"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: RFC3696 (as amended by erratum 2005-07-09)

"Fred\ Bloggs"@example.com

Valid

Valid

Valid

Valid

Test # 55
"Joe.\\Blow"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: RFC3696 (as amended by erratum 2005-07-09)

"Joe.\\Blow"@example.com

Valid

Valid

Valid

Valid

Test # 56
"Abc@def"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: RFC3696 (as amended by erratum 2005-07-09)

"Abc@def"@example.com

Valid

Valid

Valid

Valid

Test # 57
"Fred Bloggs"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: RFC3696 (February 2004)

"Fred Bloggs"@example.com

Valid

Valid

Valid

Valid

Test # 58
user+mailbox@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: RFC3696 (February 2004)

user+mailbox@example.com

Valid

Valid

Valid

Valid

Test # 59
customer/department=shipping@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: RFC3696 (February 2004)

customer/department=shipping@example.com

Valid

Valid

Valid

Valid

Test # 60
$A12345@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: RFC3696 (February 2004)

$A12345@example.com

Valid

Valid

Valid

Valid

Test # 61
!def!xyz%abc@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: RFC3696 (February 2004)

!def!xyz%abc@example.com

Valid

Valid

Valid

Valid

Test # 62
_somename@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: RFC3696 (February 2004)

_somename@example.com

Valid

Valid

Valid

Valid

Test # 63
dclo@us.ibm.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Doug Lovell (LinuxJournal, June 2007)

dclo@us.ibm.com

Valid

Valid

Valid

Valid

Test # 64
abc\@def@example.com
Expected result: Invalid
Comment: This example from RFC3696 was corrected in an erratum
Source: Doug Lovell (LinuxJournal, June 2007)

abc\@def@example.com

Invalid

Invalid

Invalid

Invalid

Test # 65
abc\\@example.com
Expected result: Invalid
Comment: This example from RFC3696 was corrected in an erratum
Source: Doug Lovell (LinuxJournal, June 2007)

abc\\@example.com

Invalid

Invalid

Invalid

Invalid

Test # 66
peter.piper@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Doug Lovell (LinuxJournal, June 2007)

peter.piper@example.com

Valid

Valid

Valid

Valid

Test # 67
Doug\ \"Ace\"\ Lovell@example.com
Expected result: Invalid
Comment: Escaping can only happen in a quoted string
Source: Doug Lovell (LinuxJournal, June 2007)

Doug\ \"Ace\"\ Lovell@example.com

Invalid

Invalid

Invalid

Invalid

Test # 68
"Doug \"Ace\" L."@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Doug Lovell (LinuxJournal, June 2007)

"Doug \"Ace\" L."@example.com

Valid

Valid

Valid

Valid

Test # 69
abc@def@example.com
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

abc@def@example.com

Invalid

Invalid

Invalid

Invalid

Test # 70
abc\\@def@example.com
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

abc\\@def@example.com

Invalid

Invalid

Invalid

Invalid

Test # 71
abc\@example.com
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

abc\@example.com

Invalid

Invalid

Invalid

Invalid

Test # 72
@example.com
Expected result: Invalid
Comment: No local part
Source: Doug Lovell (LinuxJournal, June 2007)

@example.com

Invalid

Invalid

Invalid

Invalid

Test # 73
doug@
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

doug@

Invalid

Invalid

Invalid

Invalid

Test # 74
"qu@example.com
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

"qu@example.com

Invalid

Invalid

Invalid

Invalid

Test # 75
ote"@example.com
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

ote"@example.com

Invalid

Invalid

Invalid

Invalid

Test # 76
.dot@example.com
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

.dot@example.com

Invalid

Invalid

Invalid

Invalid

Test # 77
dot.@example.com
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

dot.@example.com

Invalid

Invalid

Invalid

Invalid

Test # 78
two..dot@example.com
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

two..dot@example.com

Invalid

Invalid

Invalid

Invalid

Test # 79
"Doug "Ace" L."@example.com
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

"Doug "Ace" L."@example.com

Invalid

Invalid

Invalid

Invalid

Test # 80
Doug\ \"Ace\"\ L\.@example.com
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

Doug\ \"Ace\"\ L\.@example.com

Invalid

Invalid

Invalid

Invalid

Test # 81
hello world@example.com
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

hello world@example.com

Invalid

Invalid

Invalid

Invalid

Test # 82
gatsby@f.sc.ot.t.f.i.tzg.era.l.d.
Expected result: Invalid
Comment: Doug Lovell says this should fail
Source: Doug Lovell (LinuxJournal, June 2007)

gatsby@f.sc.ot.t.f.i.tzg.era.l.d.

Invalid

Invalid

Invalid

Invalid

Test # 83
test@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test@example.com

Valid

Valid

Valid

Valid

Test # 84
TEST@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

TEST@example.com

Valid

Valid

Valid

Valid

Test # 85
1234567890@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

1234567890@example.com

Valid

Valid

Valid

Valid

Test # 86
test+test@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test+test@example.com

Valid

Valid

Valid

Valid

Test # 87
test-test@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test-test@example.com

Valid

Valid

Valid

Valid

Test # 88
t*est@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

t*est@example.com

Valid

Valid

Valid

Valid

Test # 89
+1~1+@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

+1~1+@example.com

Valid

Valid

Valid

Valid

Test # 90
{_test_}@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

{_test_}@example.com

Valid

Valid

Valid

Valid

Test # 91
"[[ test ]]"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

"[[ test ]]"@example.com

Valid

Valid

Valid

Valid

Test # 92
test.test@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test.test@example.com

Valid

Valid

Valid

Valid

Test # 93
"test.test"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

"test.test"@example.com

Valid

Valid

Valid

Valid

Test # 94
test."test"@example.com
Expected result: Valid
Comment: Obsolete form, but documented in RFC2822
Source: Dave Child

test."test"@example.com

Valid

Valid

Valid

Valid

Test # 95
"test@test"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

"test@test"@example.com

Valid

Valid

Valid

Valid

Test # 96
test@123.123.123.x123
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test@123.123.123.x123

Valid

Valid

Valid

Valid

Test # 97
test@123.123.123.123
Expected result: Invalid
Comment: Top Level Domain won't be all-numeric (see RFC3696 Section 2). I disagree with Dave Child on this one.
Source: Dave Child

test@123.123.123.123

Invalid

Valid

Valid

Invalid

Test # 98
test@[123.123.123.123]
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test@[123.123.123.123]

Valid

Valid

Valid

Valid

Test # 99
test@example.example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test@example.example.com

Valid

Valid

Valid

Valid

Test # 100
test@example.example.example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test@example.example.example.com

Valid

Valid

Valid

Valid

Test # 101
test.example.com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test.example.com

Invalid

Invalid

Invalid

Invalid

Test # 102
test.@example.com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test.@example.com

Invalid

Invalid

Invalid

Invalid

Test # 103
test..test@example.com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test..test@example.com

Invalid

Invalid

Invalid

Invalid

Test # 104
.test@example.com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

.test@example.com

Invalid

Invalid

Invalid

Invalid

Test # 105
test@test@example.com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test@test@example.com

Invalid

Invalid

Invalid

Invalid

Test # 106
test@@example.com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dave Child

test@@example.com

Invalid

Invalid

Invalid

Invalid

Test # 107
-- test --@example.com
Expected result: Invalid
Comment: No spaces allowed in local part
Source: Dave Child

-- test --@example.com

Invalid

Invalid

Invalid

Invalid

Test # 108
[test]@example.com
Expected result: Invalid
Comment: Square brackets only allowed within quotes
Source: Dave Child

[test]@example.com

Invalid

Invalid

Invalid

Invalid

Test # 109
"test\test"@example.com
Expected result: Valid
Comment: Any character can be escaped in a quoted string
Source: Dave Child

"test\test"@example.com

Valid

Valid

Valid

Valid

Test # 110
"test"test"@example.com
Expected result: Invalid
Comment: Quotes cannot be nested
Source: Dave Child

"test"test"@example.com

Invalid

Invalid

Invalid

Invalid

Test # 111
()[]\;:,><@example.com
Expected result: Invalid
Comment: Disallowed Characters
Source: Dave Child

()[]\;:,><@example.com

Invalid

Invalid

Invalid

Invalid

Test # 112
test@.
Expected result: Invalid
Comment: Dave Child says so
Source: Dave Child

test@.

Invalid

Invalid

Invalid

Invalid

Test # 113
test@example.
Expected result: Invalid
Comment: Dave Child says so
Source: Dave Child

test@example.

Invalid

Invalid

Invalid

Invalid

Test # 114
test@.org
Expected result: Invalid
Comment: Dave Child says so
Source: Dave Child

test@.org

Invalid

Invalid

Invalid

Invalid

Test # 115
test@123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012.com
Expected result: Invalid
Comment: 255 characters is maximum length for domain. This is 256.
Source: Dave Child

test@123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012.com

Invalid

Valid

Valid

Invalid

Test # 116
test@example
Expected result: Invalid
Comment: Dave Child says so
Source: Dave Child

test@example

Invalid

Valid

Valid

Invalid

Test # 117
test@[123.123.123.123
Expected result: Invalid
Comment: Dave Child says so
Source: Dave Child

test@[123.123.123.123

Invalid

Invalid

Invalid

Invalid

Test # 118
test@123.123.123.123]
Expected result: Invalid
Comment: Dave Child says so
Source: Dave Child

test@123.123.123.123]

Invalid

Invalid

Invalid

Invalid

Test # 119
NotAnEmail
Expected result: Invalid
Comment: Phil Haack says so
Source: Phil Haack

NotAnEmail

Invalid

Invalid

Invalid

Invalid

Test # 120
@NotAnEmail
Expected result: Invalid
Comment: Phil Haack says so
Source: Phil Haack

@NotAnEmail

Invalid

Invalid

Invalid

Invalid

Test # 121
"test\\blah"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Phil Haack

"test\\blah"@example.com

Valid

Valid

Valid

Valid

Test # 122
"test\blah"@example.com
Expected result: Valid
Comment: Any character can be escaped in a quoted string
Source: Phil Haack

"test\blah"@example.com

Valid

Valid

Valid

Valid

Test # 123
"test\&#13;blah"@example.com
Expected result: Valid
Comment: Quoted string specifically excludes carriage returns unless escaped
Source: Phil Haack

"test\&#13;blah"@example.com

Valid

Valid

Valid

Valid

Test # 124
"test&#13;blah"@example.com
Expected result: Invalid
Comment: Quoted string specifically excludes carriage returns
Source: Phil Haack

"test&#13;blah"@example.com

Invalid

Invalid

Invalid

Invalid

Test # 125
"test\"blah"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Phil Haack

"test\"blah"@example.com

Valid

Valid

Valid

Valid

Test # 126
"test"blah"@example.com
Expected result: Invalid
Comment: Phil Haack says so
Source: Phil Haack

"test"blah"@example.com

Invalid

Invalid

Invalid

Invalid

Test # 127
customer/department@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Phil Haack

customer/department@example.com

Valid

Valid

Valid

Valid

Test # 128
_Yosemite.Sam@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Phil Haack

_Yosemite.Sam@example.com

Valid

Valid

Valid

Valid

Test # 129
~@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Phil Haack

~@example.com

Valid

Valid

Valid

Valid

Test # 130
.wooly@example.com
Expected result: Invalid
Comment: Phil Haack says so
Source: Phil Haack

.wooly@example.com

Invalid

Invalid

Invalid

Invalid

Test # 131
wo..oly@example.com
Expected result: Invalid
Comment: Phil Haack says so
Source: Phil Haack

wo..oly@example.com

Invalid

Invalid

Invalid

Invalid

Test # 132
pootietang.@example.com
Expected result: Invalid
Comment: Phil Haack says so
Source: Phil Haack

pootietang.@example.com

Invalid

Invalid

Invalid

Invalid

Test # 133
.@example.com
Expected result: Invalid
Comment: Phil Haack says so
Source: Phil Haack

.@example.com

Invalid

Invalid

Invalid

Invalid

Test # 134
"Austin@Powers"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Phil Haack

"Austin@Powers"@example.com

Valid

Valid

Valid

Valid

Test # 135
Ima.Fool@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Phil Haack

Ima.Fool@example.com

Valid

Valid

Valid

Valid

Test # 136
"Ima.Fool"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Phil Haack

"Ima.Fool"@example.com

Valid

Valid

Valid

Valid

Test # 137
"Ima Fool"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Phil Haack

"Ima Fool"@example.com

Valid

Valid

Valid

Valid

Test # 138
Ima Fool@example.com
Expected result: Invalid
Comment: Phil Haack says so
Source: Phil Haack

Ima Fool@example.com

Invalid

Invalid

Invalid

Invalid

Test # 139
phil.h\@\@ck@haacked.com
Expected result: Invalid
Comment: Escaping can only happen in a quoted string
Source: Phil Haack

phil.h\@\@ck@haacked.com

Invalid

Invalid

Invalid

Invalid

Test # 140
"first"."last"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

"first"."last"@example.com

Valid

Valid

Valid

Valid

Test # 141
"first".middle."last"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

"first".middle."last"@example.com

Valid

Valid

Valid

Valid

Test # 142
"first\\"last"@example.com
Expected result: Invalid
Comment: Contains an unescaped quote
Source: Dominic Sayers

"first\\"last"@example.com

Invalid

Invalid

Valid

Invalid

Test # 143
"first".last@example.com
Expected result: Valid
Comment: obs-local-part form as described in RFC 2822
Source: Dominic Sayers

"first".last@example.com

Valid

Valid

Valid

Valid

Test # 144
first."last"@example.com
Expected result: Valid
Comment: obs-local-part form as described in RFC 2822
Source: Dominic Sayers

first."last"@example.com

Valid

Valid

Valid

Valid

Test # 145
"first"."middle"."last"@example.com
Expected result: Valid
Comment: obs-local-part form as described in RFC 2822
Source: Dominic Sayers

"first"."middle"."last"@example.com

Valid

Valid

Valid

Valid

Test # 146
"first.middle"."last"@example.com
Expected result: Valid
Comment: obs-local-part form as described in RFC 2822
Source: Dominic Sayers

"first.middle"."last"@example.com

Valid

Valid

Valid

Valid

Test # 147
"first.middle.last"@example.com
Expected result: Valid
Comment: obs-local-part form as described in RFC 2822
Source: Dominic Sayers

"first.middle.last"@example.com

Valid

Valid

Valid

Valid

Test # 148
"first..last"@example.com
Expected result: Valid
Comment: obs-local-part form as described in RFC 2822
Source: Dominic Sayers

"first..last"@example.com

Valid

Valid

Valid

Valid

Test # 149
foo@[\1.2.3.4]
Expected result: Invalid
Comment: RFC 5321 specifies the syntax for address-literal and does not allow escaping
Source: Cal Henderson

foo@[\1.2.3.4]

Invalid

Valid

Valid

Invalid

Test # 150
"first\\\"last"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

"first\\\"last"@example.com

Valid

Valid

Valid

Valid

Test # 151
first."mid\dle"."last"@example.com
Expected result: Valid
Comment: Backslash can escape anything but must escape something
Source: Dominic Sayers

first."mid\dle"."last"@example.com

Valid

Valid

Valid

Valid

Test # 152
Test.&#13;&#10; Folding.&#13;&#10; Whitespace@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

Test.&#13;&#10; Folding.&#13;&#10; Whitespace@example.com

Valid

Invalid

Valid

Valid

Test # 153
first."".last@example.com
Expected result: Invalid
Comment: Contains a zero-length element
Source: Dominic Sayers

first."".last@example.com

Invalid

Valid

Valid

Invalid

Test # 154
first\last@example.com
Expected result: Invalid
Comment: Unquoted string must be an atom
Source: Dominic Sayers

first\last@example.com

Invalid

Invalid

Invalid

Invalid

Test # 155
Abc\@def@example.com
Expected result: Invalid
Comment: Was incorrectly given as a valid address in the original RFC3696
Source: RFC3696 erratum 246

Abc\@def@example.com

Invalid

Invalid

Invalid

Invalid

Test # 156
Fred\ Bloggs@example.com
Expected result: Invalid
Comment: Was incorrectly given as a valid address in the original RFC3696
Source: RFC3696 erratum 246

Fred\ Bloggs@example.com

Invalid

Invalid

Invalid

Invalid

Test # 157
Joe.\\Blow@example.com
Expected result: Invalid
Comment: Was incorrectly given as a valid address in the original RFC3696
Source: RFC3696 erratum 246

Joe.\\Blow@example.com

Invalid

Invalid

Invalid

Invalid

Test # 158
first.last@[IPv6:1111:2222:3333:4444:5555:6666:12.34.567.89]
Expected result: Invalid
Comment: IPv4 part contains an invalid octet
Source: Cal Henderson

first.last@[IPv6:1111:2222:3333:4444:5555:6666:12.34.567.89]

Invalid

Valid

Valid

Invalid

Test # 159
"test\&#13;&#10; blah"@example.com
Expected result: Invalid
Comment: Folding white space can't appear within a quoted pair
Source: Cal Henderson

"test\&#13;&#10; blah"@example.com

Invalid

Valid

Valid

Invalid

Test # 160
"test&#13;&#10; blah"@example.com
Expected result: Valid
Comment: This is a valid quoted string with folding white space
Source: Phil Haack

"test&#13;&#10; blah"@example.com

Valid

Invalid

Valid

Valid

Test # 161
{^c\@**Dog^}@cartoon.com
Expected result: Invalid
Comment: This is a throwaway example from Doug Lovell's article. Actually it's not a valid address.
Source: Doug Lovell (LinuxJournal, June 2007)

{^c\@**Dog^}@cartoon.com

Invalid

Invalid

Invalid

Invalid

Test # 162
(foo)cal(bar)@(baz)iamcal.com(quux)
Expected result: Valid
Comment: A valid address containing comments
Source: Cal Henderson

(foo)cal(bar)@(baz)iamcal.com(quux)

Valid

Invalid

Valid

Valid

Test # 163
cal@iamcal(woo).(yay)com
Expected result: Valid
Comment: A valid address containing comments
Source: Cal Henderson

cal@iamcal(woo).(yay)com

Valid

Invalid

Valid

Valid

Test # 164
"foo"(yay)@(hoopla)[1.2.3.4]
Expected result: Invalid
Comment: Address literal can't be commented (RFC5321)
Source: Cal Henderson

"foo"(yay)@(hoopla)[1.2.3.4]

Invalid

Invalid

Valid

Valid

Test # 165
cal(woo(yay)hoopla)@iamcal.com
Expected result: Valid
Comment: A valid address containing comments
Source: Cal Henderson

cal(woo(yay)hoopla)@iamcal.com

Valid

Invalid

Valid

Valid

Test # 166
cal(foo\@bar)@iamcal.com
Expected result: Valid
Comment: A valid address containing comments
Source: Cal Henderson

cal(foo\@bar)@iamcal.com

Valid

Invalid

Valid

Valid

Test # 167
cal(foo\)bar)@iamcal.com
Expected result: Valid
Comment: A valid address containing comments and an escaped parenthesis
Source: Cal Henderson

cal(foo\)bar)@iamcal.com

Valid

Invalid

Valid

Valid

Test # 168
cal(foo(bar)@iamcal.com
Expected result: Invalid
Comment: Unclosed parenthesis in comment
Source: Cal Henderson

cal(foo(bar)@iamcal.com

Invalid

Invalid

Invalid

Invalid

Test # 169
cal(foo)bar)@iamcal.com
Expected result: Invalid
Comment: Too many closing parentheses
Source: Cal Henderson

cal(foo)bar)@iamcal.com

Invalid

Invalid

Invalid

Invalid

Test # 170
cal(foo\)@iamcal.com
Expected result: Invalid
Comment: Backslash at end of comment has nothing to escape
Source: Cal Henderson

cal(foo\)@iamcal.com

Invalid

Invalid

Valid

Invalid

Test # 171
first().last@example.com
Expected result: Valid
Comment: A valid address containing an empty comment
Source: Dominic Sayers

first().last@example.com

Valid

Invalid

Valid

Valid

Test # 172
first.(&#13;&#10; middle&#13;&#10; )last@example.com
Expected result: Valid
Comment: Comment with folding white space
Source: Dominic Sayers

first.(&#13;&#10; middle&#13;&#10; )last@example.com

Valid

Invalid

Valid

Valid

Test # 173
first(12345678901234567890123456789012345678901234567890)last@(1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890)example.com
Expected result: Invalid
Comment: Too long with comments, not too long without
Source: Dominic Sayers

first(12345678901234567890123456789012345678901234567890)last@(1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890)example.com

Invalid

Invalid

Valid

Invalid

Test # 174
first(Welcome to&#13;&#10; the ("wonderful" (!)) world&#13;&#10; of email)@example.com
Expected result: Valid
Comment: Silly example from my blog post
Source: Dominic Sayers

first(Welcome to&#13;&#10; the ("wonderful" (!)) world&#13;&#10; of email)@example.com

Valid

Invalid

Valid

Valid

Test # 175
pete(his account)@silly.test(his host)
Expected result: Valid
Comment: Canonical example from RFC5322
Source: RFC 5322

pete(his account)@silly.test(his host)

Valid

Invalid

Valid

Valid

Test # 176
c@(Chris's host.)public.example
Expected result: Valid
Comment: Canonical example from RFC5322
Source: RFC 5322

c@(Chris's host.)public.example

Valid

Invalid

Valid

Valid

Test # 177
jdoe@machine(comment).  example
Expected result: Valid
Comment: Canonical example from RFC5322
Source: RFC 5322

jdoe@machine(comment).  example

Valid

Invalid

Valid

Valid

Test # 178
1234   @   local(blah)  .machine .example
Expected result: Valid
Comment: Canonical example from RFC5322
Source: RFC 5322

1234   @   local(blah)  .machine .example

Valid

Invalid

Valid

Valid

Test # 179
first(middle)last@example.com
Expected result: Invalid
Comment: Can't have a comment or white space except at an element boundary
Source: Dominic Sayers

first(middle)last@example.com

Invalid

Invalid

Valid

Invalid

Test # 180
first(abc.def).last@example.com
Expected result: Valid
Comment: Comment can contain a dot
Source: Dominic Sayers

first(abc.def).last@example.com

Valid

Invalid

Valid

Valid

Test # 181
first(a"bc.def).last@example.com
Expected result: Valid
Comment: Comment can contain double quote
Source: Dominic Sayers

first(a"bc.def).last@example.com

Valid

Invalid

Valid

Valid

Test # 182
first.(")middle.last(")@example.com
Expected result: Valid
Comment: Comment can contain a quote
Source: Dominic Sayers

first.(")middle.last(")@example.com

Valid

Invalid

Valid

Valid

Test # 183
first(abc("def".ghi).mno)middle(abc("def".ghi).mno).last@(abc("def".ghi).mno)example(abc("def".ghi).mno).(abc("def".ghi).mno)com(abc("def".ghi).mno)
Expected result: Invalid
Comment: Can't have comments or white space except at an element boundary
Source: Dominic Sayers

first(abc("def".ghi).mno)middle(abc("def".ghi).mno).last@(abc("def".ghi).mno)example(abc("def".ghi).mno).(abc("def".ghi).mno)com(abc("def".ghi).mno)

Invalid

Invalid

Valid

Invalid

Test # 184
first(abc\(def)@example.com
Expected result: Valid
Comment: Comment can contain quoted-pair
Source: Dominic Sayers

first(abc\(def)@example.com

Valid

Invalid

Valid

Valid

Test # 185
first.last@x(1234567890123456789012345678901234567890123456789012345678901234567890).com
Expected result: Valid
Comment: Label is longer than 63 octets, but not with comment removed
Source: Cal Henderson

first.last@x(1234567890123456789012345678901234567890123456789012345678901234567890).com

Valid

Invalid

Valid

Valid

Test # 186
a(a(b(c)d(e(f))g)h(i)j)@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Cal Henderson

a(a(b(c)d(e(f))g)h(i)j)@example.com

Valid

Invalid

Valid

Valid

Test # 187
a(a(b(c)d(e(f))g)(h(i)j)@example.com
Expected result: Invalid
Comment: Braces are not properly matched
Source: Cal Henderson

a(a(b(c)d(e(f))g)(h(i)j)@example.com

Invalid

Invalid

Invalid

Invalid

Test # 188
name.lastname@domain.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

name.lastname@domain.com

Valid

Valid

Valid

Valid

Test # 189
.@
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

.@

Invalid

Invalid

Invalid

Invalid

Test # 190
a@b
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

a@b

Invalid

Valid

Valid

Invalid

Test # 191
@bar.com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

@bar.com

Invalid

Invalid

Invalid

Invalid

Test # 192
@@bar.com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

@@bar.com

Invalid

Invalid

Invalid

Invalid

Test # 193
a@bar.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

a@bar.com

Valid

Valid

Valid

Valid

Test # 194
aaa.com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

aaa.com

Invalid

Invalid

Invalid

Invalid

Test # 195
aaa@.com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

aaa@.com

Invalid

Invalid

Invalid

Invalid

Test # 196
aaa@.123
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

aaa@.123

Invalid

Invalid

Invalid

Invalid

Test # 197
aaa@[123.123.123.123]
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

aaa@[123.123.123.123]

Valid

Valid

Valid

Valid

Test # 198
aaa@[123.123.123.123]a
Expected result: Invalid
Comment: extra data outside ip
Source: Paul Gregg

aaa@[123.123.123.123]a

Invalid

Invalid

Invalid

Invalid

Test # 199
aaa@[123.123.123.333]
Expected result: Invalid
Comment: not a valid IP
Source: Paul Gregg

aaa@[123.123.123.333]

Invalid

Valid

Valid

Invalid

Test # 200
a@bar.com.
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

a@bar.com.

Invalid

Invalid

Invalid

Invalid

Test # 201
a@bar
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

a@bar

Invalid

Valid

Valid

Invalid

Test # 202
a-b@bar.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

a-b@bar.com

Valid

Valid

Valid

Valid

Test # 203
+@b.c
Expected result: Valid
Comment: TLDs can be any length
Source: Paul Gregg

+@b.c

Valid

Valid

Valid

Valid

Test # 204
+@b.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

+@b.com

Valid

Valid

Valid

Valid

Test # 205
a@-b.com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

a@-b.com

Invalid

Valid

Valid

Invalid

Test # 206
a@b-.com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

a@b-.com

Invalid

Valid

Valid

Invalid

Test # 207
-@..com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

-@..com

Invalid

Invalid

Invalid

Invalid

Test # 208
-@a..com
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

-@a..com

Invalid

Invalid

Invalid

Invalid

Test # 209
a@b.co-foo.uk
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

a@b.co-foo.uk

Valid

Valid

Valid

Valid

Test # 210
"hello my name is"@stutter.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

"hello my name is"@stutter.com

Valid

Valid

Valid

Valid

Test # 211
"Test \"Fail\" Ing"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

"Test \"Fail\" Ing"@example.com

Valid

Valid

Valid

Valid

Test # 212
valid@special.museum
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

valid@special.museum

Valid

Valid

Valid

Valid

Test # 213
invalid@special.museum-
Expected result: Invalid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

invalid@special.museum-

Invalid

Valid

Valid

Invalid

Test # 214
shaitan@my-domain.thisisminekthx
Expected result: Valid
Comment: Disagree with Paul Gregg here
Source: Paul Gregg

shaitan@my-domain.thisisminekthx

Valid

Valid

Valid

Valid

Test # 215
test@...........com
Expected result: Invalid
Comment: ......
Source: Paul Gregg

test@...........com

Invalid

Invalid

Invalid

Invalid

Test # 216
foobar@192.168.0.1
Expected result: Invalid
Comment: ip need to be []
Source: Paul Gregg

foobar@192.168.0.1

Invalid

Valid

Valid

Invalid

Test # 217
"Joe\\Blow"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

"Joe\\Blow"@example.com

Valid

Valid

Valid

Valid

Test # 218
Invalid \&#10; Folding \&#10; Whitespace@example.com
Expected result: Invalid
Comment: This isn't FWS so Dominic Sayers says it's invalid
Source: Paul Gregg

Invalid \&#10; Folding \&#10; Whitespace@example.com

Invalid

Invalid

Invalid

Invalid

Test # 219
HM2Kinsists@(that comments are allowed)this.is.ok
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

HM2Kinsists@(that comments are allowed)this.is.ok

Valid

Invalid

Valid

Valid

Test # 220
user%uucp!path@somehost.edu
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Paul Gregg

user%uucp!path@somehost.edu

Valid

Valid

Valid

Valid

Test # 221
"first(last)"@example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

"first(last)"@example.com

Valid

Valid

Valid

Valid

Test # 222
 &#13;&#10; (&#13;&#10; x &#13;&#10; ) &#13;&#10; first&#13;&#10; ( &#13;&#10; x&#13;&#10; ) &#13;&#10; .&#13;&#10; ( &#13;&#10; x) &#13;&#10; last &#13;&#10; (  x &#13;&#10; ) &#13;&#10; @example.com
Expected result: Valid

Notice: Undefined index: comment in /var/www/cal/code.iamcal.com/php/rfc822/tests.php on line 245
Source: Dominic Sayers

 &#13;&#10; (&#13;&#10; x &#13;&#10; ) &#13;&#10; first&#13;&#10; ( &#13;&#10; x&#13;&#10; ) &#13;&#10; .&#13;&#10; ( &#13;&#10; x) &#13;&#10; last &#13;&#10; (  x &#13;&#10; ) &#13;&#10; @example.com

Valid

Invalid

Valid

Valid

Test # 223
test. &#13;&#10; &#13;&#10; obs@syntax.com
Expected result: Valid
Comment: obs-fws allows multiple lines
Source: George Pollard

test. &#13;&#10; &#13;&#10; obs@syntax.com

Valid

Invalid

Valid

Valid

Test # 224
test. &#13;&#10; &#13;&#10; obs@syntax.com
Expected result: Valid
Comment: obs-fws allows multiple lines (test 2: space before break)
Source: George Pollard

test. &#13;&#10; &#13;&#10; obs@syntax.com

Valid

Invalid

Valid

Valid

Test # 225
test.&#13;&#10;&#13;&#10; obs@syntax.com
Expected result: Invalid
Comment: obs-fws must have at least one WSP per line
Source: George Pollard

test.&#13;&#10;&#13;&#10; obs@syntax.com

Invalid

Invalid

Invalid

Invalid

Test # 226
"null \&#0;"@char.com
Expected result: Valid
Comment: can have escaped null character
Source: George Pollard

"null \&#0;"@char.com

Valid

Valid

Valid

Valid

Test # 227
"null &#0;"@char.com
Expected result: Invalid
Comment: cannot have unescaped null character
Source: George Pollard

"null &#0;"@char.com

Invalid

Valid

Invalid

Invalid

Test # 228
null\&#0;@char.com
Expected result: Invalid
Comment: escaped null must be in quoted string
Source: George Pollard

null\&#0;@char.com

Invalid

Invalid

Invalid

Invalid