Skip to content

Commit

Permalink
Uses old ssl until I can update for new ssl in R14A, added a start sc…
Browse files Browse the repository at this point in the history
…ript.
  • Loading branch information
russelldb committed Jun 26, 2010
1 parent 88f55eb commit ee25292
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/new_smtp.erl
Expand Up @@ -20,7 +20,7 @@
%% Description: connects to googlemail and logs the user in
%%--------------------------------------------------------------------
connect({config, Host, Port, Username, Password}) ->
{ok, Socket} = ssl:connect(Host, Port, [{active, false}], 1000),
{ok, Socket} = ssl:connect(Host, Port, [{active, false}, {ssl_imp, old}], 1000),
recv(Socket, 0),
ssl_send(Socket, "HELO localhost"),
ssl_send(Socket, "AUTH LOGIN"),
Expand Down Expand Up @@ -73,7 +73,8 @@ recv(Socket, 3) ->
exit(timeout);
recv(Socket, Times) ->
case ssl:recv(Socket, 0, 2000) of
{ok, _} -> ok;
{ok, "535-5.7.1" ++ _Str} -> exit(user_name_password_failure);
{ok, Data} -> error_logger:info_msg("~p~n", [Data]), ok;
{error, closed} -> exit(socket_closed);
{error, timeout} -> recv(Socket, Times+1)
end.
Expand Down
1 change: 1 addition & 0 deletions start-dev.sh
@@ -0,0 +1 @@
erl -pa ebin/ -erlgmail config_file '"priv/erlgmail.cfg"' absolute '"true"' -s ssl -boot start_sasl

0 comments on commit ee25292

Please sign in to comment.