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 Tadao Iida

Revision:
3:73b115345ad1
Parent:
1:24f200936579
Child:
4:89d1b1db4605
--- a/main.cpp	Mon Dec 03 10:08:30 2012 +0000
+++ b/main.cpp	Wed Dec 12 08:45:51 2012 +0000
@@ -7,8 +7,9 @@
 #include "SimpleSMTPClient.h"
 #include "TextLCD.h"
 
+#define DOMAIN "DOMAIN"
 #define SERVER "smtp.mailserver.domain"
-#define PORT "587" //25 or 587(OutBound Port25 Blocking )
+#define PORT "25" //25 or 587,465(OutBound Port25 Blocking )
 #define USER "user-id"
 #define PWD "password"
 #define FROM_ADDRESS "user-id@domain"
@@ -31,9 +32,14 @@
     printf("Setting up ...\n");
     eth.init();
     eth.connect();
-
     printf("Connected OK\n");
 
+    // IP Address 
+    printf("IP Address is %s\n", eth.getIPAddress());
+    lcd.locate(0,1);
+    lcd.printf("%s", eth.getIPAddress());
+
+    // NTP Client
     printf("NTP setTime...\n");
     NTPClient ntp;
     ntp.setTime("pool.ntp.org");
@@ -45,10 +51,6 @@
     lcd.locate(0,0);
     lcd.printf("[%s]",strTimeMsg);
 
-    // IP Address 
-    printf("IP Address is %s\n", eth.getIPAddress());
-    lcd.locate(0,1);
-    lcd.printf("%s", eth.getIPAddress());
 
     SimpleSMTPClient smtp;
     int ret;
@@ -58,8 +60,8 @@
     smtp.setToAddress(TO_ADDRESS);
     smtp.setMessage(SUBJECT,msg);
     smtp.addMessage("TEST TEST TEST\r\n");
-   
-    ret = smtp.sendmail(SERVER, USER, PWD, PORT,SMTP_AUTH_PLAIN);
+  
+    ret = smtp.sendmail(SERVER, USER, PWD, DOMAIN,PORT,SMTP_AUTH_NONE);
  
     if (ret) {
         printf("E-mail Transmission Error\r\n");