![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ok/sometimes fix server/authentication etc *** why not work all the time?
Dependencies: EthernetInterface NTPClient SimpleSMTPClient TextLCD mbed-rtos mbed
Fork of SimpleSMTPClient_HelloWorld by
Revision 4:89d1b1db4605, committed 2013-05-20
- Comitter:
- avnisha
- Date:
- Mon May 20 22:12:47 2013 +0000
- Parent:
- 3:73b115345ad1
- Commit message:
- wireless
Changed in this revision
EthernetInterface.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/EthernetInterface.lib Wed Dec 12 08:45:51 2012 +0000 +++ b/EthernetInterface.lib Mon May 20 22:12:47 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/EthernetInterface/#a0ee3ae75cfa +http://mbed.org/users/avnisha/code/EthernetInterface/#f0c3337842b6
--- a/main.cpp Wed Dec 12 08:45:51 2012 +0000 +++ b/main.cpp Mon May 20 22:12:47 2013 +0000 @@ -7,16 +7,16 @@ #include "SimpleSMTPClient.h" #include "TextLCD.h" -#define DOMAIN "DOMAIN" -#define SERVER "smtp.mailserver.domain" -#define PORT "25" //25 or 587,465(OutBound Port25 Blocking ) -#define USER "user-id" -#define PWD "password" -#define FROM_ADDRESS "user-id@domain" +#define DOMAIN "comcast.net" +#define SERVER "smtp.comcast.net" +#define PORT "587" //25 or 587,465(OutBound Port25 Blocking ) +#define USER "avnisha" +#define PWD "Bubbles1" +#define FROM_ADDRESS "avnisha@comcast.net" // TO_ADDRESS (Of some address is possible.) // to-user1@domain, to-user2@domain, to-user3@domain .... // The TO_ADDRESS are less than 128 characters. -#define TO_ADDRESS "to-user@domain" +#define TO_ADDRESS "avnisha@comcast.net" #define SUBJECT "Test Mail" @@ -61,13 +61,30 @@ smtp.setMessage(SUBJECT,msg); smtp.addMessage("TEST TEST TEST\r\n"); - ret = smtp.sendmail(SERVER, USER, PWD, DOMAIN,PORT,SMTP_AUTH_NONE); + ret = smtp.sendmail(SERVER, USER, PWD, DOMAIN,PORT,SMTP_AUTH_PLAIN); if (ret) { printf("E-mail Transmission Error\r\n"); } else { printf("E-mail Transmission OK\r\n"); } + + // + // send as SMS text + // + + smtp.setFromAddress(FROM_ADDRESS); + smtp.setToAddress("5105794214@txt.att.net"); // MODIFY for carrier + smtp.setMessage(SUBJECT,msg); + smtp.addMessage("TEST TEST TEST\r\n"); + + ret = smtp.sendmail(SERVER, USER, PWD, DOMAIN,PORT,SMTP_AUTH_PLAIN); + + if (ret) { + printf("SMS Transmission Error\r\n"); + } else { + printf("SMS Transmission OK\r\n"); + } return 0;