kivra / email Goto Github PK
View Code? Open in Web Editor NEWThe Erlang Mail application or Email for short
Home Page: http://labs.kivra.com
License: MIT License
The Erlang Mail application or Email for short
Home Page: http://labs.kivra.com
License: MIT License
I had add io:format("Req = ~p~n", [Req]),
in file email_adapter_mailgun.erl
line 71 for debug.
wang[18:51][/tmp/em/email]$ erl -pa ebin/ -config xx
Erlang/OTP 17 [erts-6.2] [source] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.2 (abort with ^G)
1> application:start(email).
ok
2> email:send({<<>>, <<"[email protected]">>}, {<<>>, <<"[email protected]">>}, <<"Test">>, <<"This is content!">>).
Req = {"https://api.mailgun.net/v2/sandbox0bcd8cad030d405f863c68bf70fa83f9.mailgun.org/messages",
[{"Authorization",
"Basic YXBpOmtleS05am1kZGRvZzJyaHFmOGotbm85ZnEtbXBpcWNkbzg1MQ=="}],
"application/x-www-form-urlencoded",
<<"text=This+is+content%21&to=%3cmy_sting%40163.com%3e&from=%3ca%40b.com%3e&subject=Test">>}
=ERROR REPORT==== 8-Dec-2014::18:52:35 ===
** State machine <0.66.0> terminating
** Last message in was {tcp,#Port<0.1726>,
<<22,3,3,0,93,2,0,0,89,3,3,84,133,130,243,102,159,
77,27,129,103,212,11,112,210,57,249,5,218,63,49,
91,175,121,32,128,159,56,223,192,0,9,22,32,58,
123,102,241,79,0,39,216,192,29,98,193,169,207,
53,204,47,76,239,87,35,102,26,238,171,105,137,
195,112,66,106,135,192,40,0,0,17,0,0,0,0,255,1,
0,1,0,0,11,0,4,3,0,1,2,22,3,3,12,114,11,0,12,
110,0,12,107,0,5,4,48,130,5,0,48,130,3,232,160,
3,2,1,2,2,3,2,103,201,48,13,6,9,42,134,72,134,
247,13,1,1,5,5,0,48,64,49,11,48,9,6,3,85,4,6,19,
2,85,83,49,23,48,21,6,3,85,4,10,19,14,71,101,
111,84,114,117,115,116,44,32,73,110,99,46,49,24,
48,22,6,3,85,4,3,19,15,71,101,111,84,114,117,
115,116,32,83,83,76,32,67,65,48,30,23,13,49,51,
48,55,50,56,49,57,51,53,53,52,90,23,13,49,55,49,
48,50,57,49,57,51,55,49,49,90,48,129,154,49,41,
48,39,6,3,85,4,5,19,32,68,109,119,67,53,52,121,
53,115,86,57,122,87,70,81,75,82,72,111,71,117,
47,72,116,76,117,73,47,104,87,111,82,49,11,48,9,
6,3,85,4,6,19,2,85,83,49,19,48,17,6,3,85,4,8,19,
10,67,97,108,105,102,111,114,110,105,97,49,22,
48,20,6,3,85,4,7,19,13,83,97,110,32,70,114,97,
110,99,105,115,99,111,49,27,48,25,6,3,85,4,10,
19,18,82,97,99,107,115,112,97,99,101,32,85,83,
44,32,73,110,99,46,49,22,48,20,6,3,85,4,3,12,13,
42,46,109,97,105,108,103,117,110,46,110,101,116,
48,130,1,34,48,13,6,9,42,134,72,134,247,13,1,1,
1,5,0,3,130,1,15,0,48,130,1,10,2,130,1,1,0,198,
224,142,176,78,199,13,100,45,198,133,222,89,32,
129,164,113,183,154,96,185,228,220,253,128,151,
106,156,236,227,178,6,160,0,125,6,216,164,126,
144,90,192,57,158,187,141,18,93,39,246,196,255,
157,167,152,172,90,36,138,158,198,4,151,158,158,
197,56,161,40,112,137,154,10,178,200,71,208,245,
97,6,208,235,154,109,68,240,185,173,233,20,195,
18,177,225,22,105,192,132,115,69,165,180,242,
127,98,170,19,200,6,209,43,20,154,230,96,176,86,
223,249,164,254,135,12,51,96,134,59,144,20,249,
191,233,50,0,170,133,247,87,53,250,220,3,167,
115,13,119,28,18,79,141,50,161,110,251,132,76,2,
109,143,20,230,44,5,26,71,83,14,28,208,162,126,
171,255,87,17,254,199,250,54,48,26,247,159,136,
230,181,122,47,222,158,152,64,192,15,96,243,153,
88,185,149,124,80,2,174,178,124,37,155,195,47,
17,29,207,59,196,169,242,44,181,66,226,46,137,
39,81,28,62,193,179,121,6,183,75,95,244,37,98,
175,160,158,54,16,2,248,164,193,37,133,213,109,
75,35,90,141,25,39,2,3,1,0,1,163,130,1,166,48,
130,1,162,48,31,6,3,85,29,35,4,24,48,22,128,20,
66,121,84,27,97,205,85,43,62,99,213,60,72,87,
245,159,251,69,206,74,48,14,6,3,85,29,15,1,1,
255,4,4,3,2,4,176,48,29,6,3,85,29,37,4,22,48,20,
6,8,43,6,1,5,5,7,3,1,6,8,43,6,1,5,5,7,3,2,48,37,
6,3,85,29,17,4,30,48,28,130,13,42,46,109,97,105,
108,103,117,110,46,110,101,116,130,11,109,97,
105,108,103,117,110,46,110,101,116,48,61,6,3,85,
29,31,4,54,48,52,48,50,160,48,160,46,134,44,104,
116,116,112,58,47,47,103,116,115,115,108,45,99,
114,108,46,103,101,111,116,114,117,115,116,46,
99,111,109,47,99,114,108,115,47,103,116,115,115,
108,46,99,114,108,48,29,6,3,85,29,14,4,22,4,20,
39,1,238,128,233,30,131,237,159,182,17,39,131,
223,238,211,232,221,153,43,48,12,6,3,85,29,19,1,
1,255,4,2,48,0,48,111,6,8,43,6,1,5,5,7,1,1,4,99,
48,97,48,42,6,8,43,6,1,5,5,7,48,1,134,30,104,
116,116,112,58,47,47,103,116,115,115,108,45,111,
99,115,112,46,103,101,111,116,114,117,115,116,
46,99,111,109,48,51,6,8,43,6,1,5,5,7,48,2,134,
39,104,116,116,112,58,47,47,103,116,115,115,108,
45,97,105,97,46,103,101,111,116,114,117,115,116,
46,99,111,109,47,103,116,115,115,108,46,99,114,
116,48,76,6,3,85,29,32,4,69,48,67,48,65,6,10,96,
134,72,1,134,248,69,1,7,54,48,51,48,49,6,8,43,6,
1,5,5,7,2,1,22,37,104,116,116,112,58,47,47,119,
119,119,46,103,101,111,116,114,117,115,116,46,
99,111,109,47,114,101,115,111,117,114,99,101,
115,47,99,112,115,48,13,6,9,42,134,72,134,247,
13,1,1,5,5,0,3,130,1,1,0,11,205,22,1,30,144,214,
194,29,89,147,75,130,54,16,9,247,70,45,50,158,
63,201,24,170,124,200,207,102,32,42,61,248,126,
226,193,75,83,70,178,71,236,96,95,42,59,50,224,
134,102,32,90,4,33,148,232,143,143,227,88,185,
161,97,92,139,161,92,36,36,138,164,20,103,77,
118,41,172,60,37,164,110,123,255,237,200,159,89,
60,83,190,192,95,122,233,249,30,159,165,126,103,
159,148,111,85,80,113,133,249,250,95,107,60,107,
249,171,242,29,20,225,2,94,222,45,211,116,28,34,
23,16,176,112,22,233,149,153,197,51,160,215,203,
79,253,97,82,48,39,23,184,120,17,56,213,43,84,
98,235,68,95,67,34,23,131,137,168,138,11,63,163,
188,8,73,3,207,177,64,40,249,77,3,196,184,73,
203,54,173,117,236,240,240,241,161,32,248,62,40,
89,42,1,115,15,244,172,110,39,135,10,141,124,
148,154,35,172,218,112,136,5,27,50,121,126,33,
69,253,199,189,147,174,155,96,135,170,193,118,
219,81,192,94,188,65,221,248,160,167,3,45,61,45,
14,101,202,67,59,152,168,51,151,0,3,221,48,130,
3,217,48,130,2,193,160,3,2,1,2,2,3,2,54,208,48,
13,6,9,42,134,72,134,247,13,1,1,5,5,0,48,66,49,
11,48,9,6>>}
** When State == hello
** Data == [{data,
[{"StateData",
{state,client,
{#Ref<0.0.0.66>,<0.62.0>},
gen_tcp,tls_connection,tcp,tcp_closed,tcp_error,
"api.mailgun.net",443,#Port<0.1726>,
{ssl_options,tls,
[{3,3},{3,2},{3,1},{3,0}],
verify_none,
{#Fun<ssl.7.50551058>,[]},
#Fun<ssl.8.50551058>,false,false,undefined,1,
<<>>,"***",<<>>,"***","***","***",<<>>,"***",
undefined,undefined,"***","***",
[<<"À$">>,<<"À(">>,<<"À&">>,<<"À*">>,
<<0,107>>,
<<0,106>>,
<<0,61>>,
<<"À#">>,<<"À'">>,<<"À%">>,<<"À)">>,
<<0,103>>,
<<0,64>>,
<<0,60>>,
<<"À\n">>,
<<192,20>>,
<<0,57>>,
<<0,56>>,
<<192,5>>,
<<192,15>>,
<<0,53>>,
<<"À\b">>,
<<192,18>>,
<<0,22>>,
<<0,19>>,
<<192,3>>,
<<"À\r">>,
<<0,10>>,
<<"À\t">>,
<<192,19>>,
<<0,51>>,
<<0,50>>,
<<192,4>>,
<<192,14>>,
<<0,47>>,
<<192,7>>,
<<192,17>>,
<<0,5>>,
<<0,4>>,
<<0,21>>,
<<192,2>>,
<<"À\f">>,
<<0,9>>],
#Fun<ssl.1.50551058>,true,268435456,false,
undefined,false,undefined,undefined,true,
undefined,false},
{socket_options,binary,0,0,0,false},
"***","***","***",20499,"***",32790,
ssl_session_cache,
{3,3},
false,undefined,
{undefined,undefined},
undefined,undefined,"***","***","***",undefined,
"***","***","***",24596,#Ref<0.0.0.68>,undefined,
"***",
{false,first},
{<0.62.0>,#Ref<0.0.0.65>},
#Ref<0.0.0.69>,
{[],[]},
false,true,false,false,undefined,undefined,
undefined}}]}]
** Reason for termination =
** {{badmatch,<<>>},
[{ssl_handshake,dec_hello_extensions,2,
[{file,"ssl_handshake.erl"},{line,1737}]},
{ssl_handshake,decode_handshake,3,
[{file,"ssl_handshake.erl"},{line,926}]},
{tls_handshake,get_tls_handshake_aux,3,
[{file,"tls_handshake.erl"},{line,155}]},
{tls_connection,next_state,4,[{file,"tls_connection.erl"},{line,433}]},
{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,503}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
{error,{failed_connect,[{to_address,{"api.mailgun.net",443}},
{inet,[inet],
{eoptions,{{{badmatch,<<>>},
[{ssl_handshake,dec_hello_extensions,2,
[{file,"ssl_handshake.erl"},{line,1737}]},
{ssl_handshake,decode_handshake,3,
[{file,"ssl_handshake.erl"},{line,926}]},
{tls_handshake,get_tls_handshake_aux,3,
[{file,"tls_handshake.erl"},{line,155}]},
{tls_connection,next_state,4,
[{file,"tls_connection.erl"},{line,433}]},
{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,503}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,237}]}]},
{gen_fsm,sync_send_all_state_event,
[<0.66.0>,{start,10000},infinity]}}}}]}}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.