Skip to content
Browse files

Accept more characters in local-part of e-mail address.

  • Loading branch information...
1 parent 80885e2 commit 1805854660b195ea13e95c0319a6aa0a1c7ee4bf @arjan arjan committed Jul 18, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/gen_smtp_server_session.erl
View
5 src/gen_smtp_server_session.erl
@@ -660,6 +660,11 @@ parse_encoded_address(<<H, Tail/binary>>, Acc, {false, AB}) when H >= $a, H =< $
parse_encoded_address(Tail, [H | Acc], {false, AB}); % lowercase letters
parse_encoded_address(<<H, Tail/binary>>, Acc, {false, AB}) when H =:= $-; H =:= $.; H =:= $_ ->
parse_encoded_address(Tail, [H | Acc], {false, AB}); % dash, dot, underscore
+% Allowed characters in the local name: ! # $ % & ' * + - / = ? ^ _ ` . { | } ~
+parse_encoded_address(<<H, Tail/binary>>, Acc, {false, AB}) when H =:= $+;
+ H =:= $!; H =:= $#; H =:= $$; H =:= $%; H =:= $&; H =:= $'; H =:= $*; H =:= $=;
+ H =:= $/; H =:= $?; H =:= $^; H =:= $`; H =:= ${; H =:= $|; H =:= $}; H =:= $~ ->
+ parse_encoded_address(Tail, [H | Acc], {false, AB}); % other characters
parse_encoded_address(_, _Acc, {false, _AB}) ->
error;
parse_encoded_address(<<H, Tail/binary>>, Acc, Quotes) ->

0 comments on commit 1805854

Please sign in to comment.
Something went wrong with that request. Please try again.