// change to your email address (sender) client.write("MAIL From: <firstname.lastname@example.org>\r\n"); if(!eRcv()) return 0;// change to recipient address Serial.println("Sending To"); client.write("RCPT To: <email@example.com>\r\n"); if(!eRcv()) return 0; Serial.println("Sending DATA"); client.write("DATA\r\n"); if(!eRcv()) return 0; Serial.println("Sending email");// change to recipient address client.write("To: You <firstname.lastname@example.org>\r\n");// change to your address client.write("From: Me <email@example.com>\r\n");
I wonder why sender and recipient addresses are sent twice. Does the second time just show up as email content?
So if I replace the sender email with say another person's email address, say Mr. X, will the recipient think that the email came from Mr. X? Kind of dangerous?!
Be careful while testing. With email code loaded in the arduino, mail will be sent every time you reboot the arduino opening the serial monitor and such. You can email bomb your own mail box if not careful.
My code won't. It requires the 'e' key press (or some other trigger) to send email.