January 2015
Beginner
324 pages
7h 42m
English
To send an email from the Arduino, we’ll basically implement the telnet session from the previous chapter. Instead of hardwiring the email’s attributes into the networking code, we’ll create create something more advanced.
We start with an Email class:
| Ethernet/Email/email.h | |
| | #ifndef __EMAIL__H_ |
| | #define __EMAIL__H_ |
| | |
| | class Email { |
| | String _from, _to, _subject, _body; |
| | |
| | public: |
| | |
| | Email( |
| | const String& from, |
| | const String& to, |
| | const String& subject, |
| | const String& body |
| | ) : _from(from), _to(to), _subject(subject), _body(body) {} |
| | |
| | const String& getFrom() const { return _from; } |
| | const String& getTo() const { return _to; } |
| | const String& getSubject() const { return |
Read now
Unlock full access