Gotta a little code that when a button is pressed, it connects to a SMTP server using Client.connect function and with basic SMTP commands, sends an email. Everything is working A1 except now I am moving the device in a different location and their SMTP server need auth login. No problem with my Arduino but cannot make it work with my spark… no clues… When the button is pressed, it start the routine but never ends… here’s a sample code example… If I // the bold area, it works, if I uncomment the bold it dies… Anybody have a clue?
resolve my problem… added a client.flush after each command line in smtp auth…
client.println(“ehlo”);
client.flush();
client.println(“auth login”);
client.flush();
client.println(smtpuser);
client.flush();
client.println(smtppass);
client.flush();
client.println(emailexpediteur);
client.println(emaildestingroupe);
Hmm… now you got me wondering why the heck that works. Flush() just read()'s until there available() == false. Can’t see how that’s helping… if you are even reading anything.
something happened in the last days with the web API cause I ref lash my core and with the same code, nothing works anymore… Just sending an email is impossible with a press of a button… Cancelled my orders for 4 other cores… Going back to arduino to finish my project…
I tried you’re program DBub, when I try to flash the program it comes up with:
the_user_app.cpp:23:9: error: ‘client’ was not declared in this scope
}
^
the_user_app.cpp:23:24: error: ‘server’ was not declared in this scope
}
^
the_user_app.cpp:52:15: error: ‘wait’ was not declared in this scope
client.println(“data”);