| 28 | } |
| 29 | |
| 30 | int 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 | |
| 47 | void onConnected(IpAddress ip, IpAddress mask, IpAddress gateway) |
| 48 | { |
nothing calls this directly
no test coverage detected