File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -338,6 +338,8 @@ def getrouteaddr(self):
338338 elif self .field [self .pos ] == '@' :
339339 self .pos += 1
340340 expectroute = True
341+ elif self .field [self .pos ] == ',' :
342+ self .pos += 1
341343 elif self .field [self .pos ] == ':' :
342344 self .pos += 1
343345 else :
Original file line number Diff line number Diff line change @@ -3141,6 +3141,12 @@ def test_parseaddr_preserves_spaces_in_local_part(self):
31413141 self .assertEqual (('' , 'merwok.wok.wok@xample.com' ),
31423142 utils .parseaddr ('merwok. wok . wok@xample.com' ))
31433143
3144+ def test_parseaddr_handles_obsolete_addressing (self ):
3145+ self .assertEqual (('foobar' , 'foo@bar.com' ),
3146+ utils .parseaddr ('"foobar" <@hop.org:foo@bar.com>' ))
3147+ self .assertEqual (('foobar' , 'foo@bar.com' ),
3148+ utils .parseaddr ('"foobar" <@hop1.org,@hop2.org:foo@bar.com>' ))
3149+
31443150 def test_formataddr_does_not_quote_parens_in_quoted_string (self ):
31453151 addr = ("'foo@example.com' (foo@example.com)" ,
31463152 'foo@example.com' )
You can’t perform that action at this time.
0 commit comments