Email send question.


hi i'm trying send email hotmail account gmail account using ethernet shield. possible?  code:
#include <spi.h>
#include <ethernet.h>

byte mac[] = { 0x90, 0xa2, 0xda, 0x00, 0x59, 0x67 }; 
ipaddress ip( 192, 168, 1, 107 );   
ipaddress gateway ( 192, 168, 2, 1 );
ipaddress subnet ( 255, 255, 255, 0 );
ipaddress server (65,55,92,136);// hotmail smtp ip addres
int x= 5000;

ethernetclient client;

void setup()
{
  delay(x);
  serial.begin(9600);
  ethernet.begin(mac,ip);
  delay (x);
  serial.println ("connecting");
  if (client.connect (server,25)) {
    serial.println ("connected");
    client.println ("hello @gmail.com");
    delay (x);
    client.println ("mail from:@gmail.com>");
    delay(x);
    client.println ("rcpt to:@hotmail.com>");
    delay(x);
    client.println ("data");
    client.println ("to:@hotmail.com");
    client.println ("subject:trial");
    client.println ("espero que alla funcionado");
    client.println ("quit");
    delay(x);
    client.println();
   
} else {
   serial.println("connection failed");
}
}

void loop()
{
if (client.available()) {
   char c = client.read();
   serial.print(c);
}

if (!client.connected()) {
   serial.println();
   serial.println("disconnecting.");
   client.stop();
   for(;;)
     ;
}
}


 
i'm getting in serial monitor:


connecting
connected
220 snt0-mc1-f36.snt0.hotmail.com sending unsolicited commercial or bulk e-mail microsoft's computer network prohibited. other restrictions found a
disconnecting.

you not waiting server respond. here email send program error checking.
http://arduino.cc/forum/index.php/topic,102169.msg766795.html#msg766795


Arduino Forum > Using Arduino > Programming Questions > Email send question.


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial