MCPcopy Create free account
hub / github.com/SmingHub/Sming / onMailSent

Function onMailSent

samples/SmtpClient/app/application.cpp:30–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30int onMailSent(SmtpClient& client, int code, char* status)
31{
32 // get the sent mail message
33 MailMessage* mail = client.getCurrentMessage();
34
35 // TODO: The status line contains the unique ID that was given to this email
36 Serial << _F("Mail sent to '") << mail->to << _F("'. Status: ") << status << endl;
37
38 // And if there are no more pending emails then you can disconnect from the server
39 if(client.countPending() == 0) {
40 Serial.println(_F("No more mails to send. Quitting..."));
41 client.quit();
42 }
43
44 return 0;
45}
46
47void onConnected(IpAddress ip, IpAddress mask, IpAddress gateway)
48{

Callers

nothing calls this directly

Calls 4

getCurrentMessageMethod · 0.80
countPendingMethod · 0.80
printlnMethod · 0.80
quitMethod · 0.80

Tested by

no test coverage detected