11 years, 10 months ago.

I cannot send an email !!

I send an email when Iexceed a constant numerical value. but,I can send an email only once. I want to know a reason. Please tell.

This is a program.

int message(float tmp_1, float hum_1, float w_1, time_t ctTime) { Host host(IpAddr(), PORT, SERVER); SMTPClient smtp(host, DOMAIN, USER, PASSWORD, SMTP_AUTH_NONE); lcd.printf("message()\n"); EmailMessage msg; msg.clearTo(); msg.clearContent(); msg.setFrom(FROM_ADDRESS); msg.addTo(TO_ADDRESS); msg.printf("Subject: mbed SMTPClient test at %s\n\n", ctime(&ctTime)); msg.printf("kion:%2.1f\n" ,tmp_1); msg.printf("shitsudo:%2.1f\n ",hum_1); msg.printf("WBGT:%2.1f\n ",w_1); lcd.printf("S: %d\n", smtp.send(&msg)); lcd.printf("L: %s", smtp.getLastResponse().c_str()); }

Edit this question and put <<code>> tags around the code to make it more readable.

posted by Stephen Paulger 07 Jan 2013
Be the first to answer this question.