SMTP email lightbulb example by croscwa

This sketch is missing a short description
conn=net.createConnection(net.TCP, 0) conn:on("receive", function(conn, payload) print(payload) end) conn:on("disconnection", function(conn,payload) print("disconnect") conn:close() end) conn:on("connection", function(conn,payload) print("sending...") conn:send("EHLO smtpcorp.com\r\n"); conn:send("AUTH LOGIN\r\n"); conn:send("aaaaaaaaaaaaaaaaaaaaa==\r\n");--username conn:send("aaaaaaaaaaaaaaaa\r\n"); --password conn:send("HELO smtpcorp.com\r\n") conn:send("MAIL FROM: you@yourmail\r\n"); conn:send("RCPT TO:you@yourmail\r\n"); conn:send("DATA\r\n"); conn:send("From: Esp8266<you@yourmail>\r\n"); conn:send("To: you@yourmai\r\n"); conn:send("Subject: Mail from esp8266\r\n"); conn:send("\r\n"); conn:send("\r\n Here is the body of the mail"); conn:send(".\r\n"); conn:send(".\r\n"); end) conn:dns('smtpcorp.com',function(conn,ip) ipaddr=ip; print(ipaddr) conn:connect(2525,ipaddr) end)

Embed This Sketch

Use the following HTML code to embed the sketch code above in your blog or website.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/sketch:126572" frameborder="0"></iframe>

Embed The Serial Monitor

You can also embed the Serial Monitor section! Just use this HTML code.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/serialmonitor" frameborder="0"></iframe>