selectel / pat

Pat, the only SMTP postman!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to send email without authentication.

snar opened this issue · comments

Test case:

(node@hostname)249> f(Conn), Conn = pat:connect({<<"localhost">>, 25}, []).
{<0.27480.0>,[]}
(node@hostname)250> pat:send(Conn, #email{sender= <<"snar@host.dom.ain">>,
recipients = [ <<"snar@dom.ain">>, <<"snar@staff.dom.ain">>],
subject = <<"Hello, Pat">>, message = <<"some text message">>}).
20:21:15.341 [debug] 220 hostname ESMTP Sendmail 8.15.2/8.15.2; Wed, 2 Mar 2016 20:21:15 +0300 (MSK)

20:21:15.360 [debug] EHLO hostname

20:21:15.360 [debug] 250-hostname Hello localhost [127.0.0.1], pleased to meet you

20:21:15.360 [debug] 250-ENHANCEDSTATUSCODES

20:21:15.360 [debug] 250-PIPELINING

20:21:15.360 [debug] 250-8BITMIME

20:21:15.361 [debug] 250-SIZE

20:21:15.361 [debug] 250-DSN

20:21:15.361 [debug] 250-ETRN

20:21:15.361 [debug] 250-STARTTLS

20:21:15.361 [debug] 250-DELIVERBY

20:21:15.361 [debug] 250 HELP

20:21:15.361 [debug] STARTTLS

20:21:15.372 [debug] 220 2.0.0 Ready to start TLS

20:21:15.632 [debug] EHLO hostname

20:21:15.633 [debug] 250-hostname Hello localhost [127.0.0.1], pleased to meet you

20:21:15.633 [debug] 250-ENHANCEDSTATUSCODES

20:21:15.633 [debug] 250-PIPELINING

20:21:15.633 [debug] 250-8BITMIME

20:21:15.633 [debug] 250-SIZE

20:21:15.633 [debug] 250-DSN

20:21:15.633 [debug] 250-ETRN

20:21:15.633 [debug] 250-DELIVERBY

20:21:15.633 [debug] 250 HELP

** exception exit: {{{case_clause,{ok,undefined}},
[{pat_smtp,do_check,2,
[{file,"src/pat_smtp.erl"},{line,108}]},
{pat_smtp,send,3,[{file,"src/pat_smtp.erl"},{line,90}]},
{pat_worker,send_one,4,
[{file,"src/pat_worker.erl"},{line,156}]},
{pat_worker,send_any,4,
[{file,"src/pat_worker.erl"},{line,135}]},
{pat_worker,handle_call,3,
[{file,"src/pat_worker.erl"},{line,44}]},
{gen_server,try_handle_call,4,
[{file,"gen_server.erl"},{line,629}]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,661}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,240}]}]},
{gen_server,call,
[<0.27480.0>,
{send,
#email{
sender = <<"snar@host.dom.ain">>,
recipients =
[<<"snar@dom.ain">>,
<<"snar@staff.dom.ain">>],
subject = <<"Hello, Pat">>,
message = <<"some text message">>,
headers = []},
[]},
infinity]}}
in function gen_server:call/3 (gen_server.erl, line 212)
(node@hostname)251> 20:21:15.633 [error] gen_server pat_worker terminated with reason: no case clause matching {ok,undefined} in pat_smtp:do_check/2 line 108
20:21:15.633 [error] CRASH REPORT Process pat_worker with 0 neighbours exited with reason: no