Gmail replies error for SMTP

hai i have a problem on sending mail to Gmail using SMTP , I am getting error reply from the gmail server can any one help me to solve this..

"Ready. Press 'e' to send
start connecting
connected
220 mx.google.com ESMTP 9si17802234wjz.20 - gsmtp
250 mx.google.com at your service
250 2.1.0 OK 9si17802234wjz.20 - gsmtp
250 2.1.5 OK 9si17802234wjz.20 - gsmtp
354 Go ahead 9si17802234wjz.20 - gsmtp
550-5.7.1 [115.118.170.24] The IP you're using to send mail is not authorized to
550-5.7.1 send email directly to our servers. Please use the SMTP relay at your
550-5.7.1 service provider instead. Learn more at
550 5.7.1 'The IP you're using to send email is not authorized...' - Gmail Help 9si17802234wjz.20 - gsmtp "

Your code probably doesn't work with gmail.

this is the code which i have used...

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x59, 0x67 };
IPAddress ip( 192, 168, 1, 35 );
IPAddress gateway( 192, 168, 1, 1 );
IPAddress subnet( 255, 255, 255, 0 );

// gmail.com email server
IPAddress server(74,125,71,26);

EthernetClient client;

void setup()
{
Serial.begin(9600);
pinMode(4,OUTPUT);
digitalWrite(4,HIGH);
// start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
// try to congifure using IP address instead of DHCP:
Ethernet.begin(mac, ip);
}
delay(2000);
Serial.println("Ready. Press 'e' to send");
}

void loop()
{
byte inChar;

inChar = Serial.read();

if(inChar == 'e')
{
if(sendEmail()) Serial.println("Email sent");
else Serial.println("Email failed");
}
}

byte sendEmail()
{
byte thisByte = 0;
byte respCode;
Serial.println("start connecting");
if (client.connect(server,25)) {
Serial.println("connected");
} else {
Serial.println("connection failed");
return 0;
}

if(!eRcv()) return 0;

// change this ip to your public ip
client.write("helo 115.118.170.24\r\n");

if(!eRcv()) return 0;

// change this
client.write("MAIL From: sathi.rska@gmail.com\r\n");

if(!eRcv()) return 0;

// change this
client.write("RCPT To: ashokkumar.sp7@gmail.com\r\n");

if(!eRcv()) return 0;

client.write("DATA\r\n");

if(!eRcv()) return 0;

//change this
client.write("To: You ashokkumar.sp7@gmail.com\r\n");

// change this
client.write("From: Me sathi.rska@gmail.com\r\n");

client.write("Subject: Arduino email test\r\n");
client.write("\r\n");
client.write("This is from my Arduino!\r\n");
client.write("This is another line of the body.\r\n");
client.write(".\r\n");
client.write(".\r\n");

if(!eRcv()) return 0;

client.write("QUIT\r\n");

if(!eRcv()) return 0;

client.stop();
Serial.println("disconnected");
return 1;
}

byte eRcv()
{
byte respCode;
byte thisByte;

while(!client.available()) delay(1);

respCode = client.peek();

while(client.available())
{
thisByte = client.read();
Serial.write(thisByte);
}

if(respCode >= '4')
{
efail();
return 0;
}

return 1;
}

void efail()
{
byte thisByte = 0;

client.write("QUIT\r\n");

while(!client.available()) delay(1);

while(client.available())
{
thisByte = client.read();
Serial.write(thisByte);
}

client.stop();
Serial.println("disconnected");
}

is theri is any problem in this code..

is theri is any problem in this code..

Well, you didn't bother to read #7 below:

http://forum.arduino.cc/index.php/topic,148850.0.html

I answered your question on your other post, but I will answer it again here.

The IP you are using is not authorized to send email to a gmail server. That is normally the response you get if you do not have a commercial internet account and a static IP.

This response from the gmail email server explains it:

550-5.7.1 [115.118.170.24] The IP you're using to send mail is not authorized to
550-5.7.1 send email directly to our servers. Please use the SMTP relay at your
550-5.7.1 service provider instead. Learn more at
550 5.7.1 'The IP you're using to send email is not authorized...' - Gmail Help 9si17802234wjz.20 - gsmtp "

It does work,
Can you ping your arduino from your router?
Did you allow on your gmail dashboard settings to allow lower security connections?.

For ease try making your send and receive the same@gmail.com
Did you check the spam folder, you will need to make a filter "never send to spam"

It doesn't work if you get this response message.

550-5.7.1 [115.118.170.24] The IP you're using to send mail is not authorized to
550-5.7.1 send email directly to our servers. Please use the SMTP relay at your
550-5.7.1 service provider instead. Learn more at
550 5.7.1 'The IP you're using to send email is not authorized...' - Gmail Help 9si17802234wjz.20 - gsmtp "