Help with inetGSM.H (inet.openmail)

hi guys! long time out of here!
i’m trying to use the library inetGSM.H and specificly the openmail function
the think is that im trying to use that one with my acount in gmail with this information

https://support.google.com/a/answer/176600?hl

but, is not working, even that the serial port is saying “SEND OK”, i dont recive the emails ever.

there’s somebody with experience with this issue?
the function to fill is the following

int InetGSM::openmail(char* server, char* loginbase64, char* passbase64, char* from, char* to, char* subj)
{
     boolean connected=false;
     int n_of_at=0;
     char end_c[2];
     end_c[0]=0x1a;
     end_c[1]='\0';

     while(n_of_at<3) {
          if(!connectTCP(server, 25)) {
#ifdef DEBUG_ON
               Serial.println("DB:NOT CONN");
#endif
               n_of_at++;
          } else {
               connected=true;
               n_of_at=3;
          }
     }

     if(!connected) return 0;

     delay(100);
     gsm.SimpleWrite("HELO ");
     gsm.SimpleWrite(server);
     gsm.SimpleWrite("\n");
     gsm.SimpleWrite(end_c);
     gsm.WaitResp(5000, 100, "OK");
     if(!gsm.IsStringReceived("SEND OK"))
          return 0;
     delay(500);
     gsm.WaitResp(5000, 100);

     delay(100);
     gsm.SimpleWriteln("AT+CIPSEND");
     switch(gsm.WaitResp(5000, 200, ">")) {
     case RX_TMOUT_ERR:
          return 0;
          break;
     case RX_FINISHED_STR_NOT_RECV:
          return 0;
          break;
     }
     gsm.SimpleWrite("AUTH LOGIN\n");
     gsm.SimpleWrite(end_c);
     gsm.WaitResp(5000, 100, "OK");
     if(!gsm.IsStringReceived("OK"))
          return 0;
     delay(500);
     gsm.WaitResp(5000, 100);

     delay(100);
     gsm.SimpleWriteln("AT+CIPSEND");
     switch(gsm.WaitResp(5000, 200, ">")) {
     case RX_TMOUT_ERR:
          return 0;
          break;
     case RX_FINISHED_STR_NOT_RECV:
          return 0;
          break;
     }
     gsm.SimpleWrite(loginbase64);
     gsm.SimpleWrite("\n");
     gsm.SimpleWrite(end_c);
     gsm.WaitResp(5000, 100, "OK");
     if(!gsm.IsStringReceived("OK"))
          return 0;
     delay(500);
     gsm.WaitResp(5000, 100);

     delay(100);
     gsm.SimpleWriteln("AT+CIPSEND");
     switch(gsm.WaitResp(5000, 200, ">")) {
     case RX_TMOUT_ERR:
          return 0;
          break;
     case RX_FINISHED_STR_NOT_RECV:
          return 0;
          break;
     }
     gsm.SimpleWrite(passbase64);
     gsm.SimpleWrite("\n");
     gsm.SimpleWrite(end_c);
     gsm.WaitResp(5000, 100, "OK");
     if(!gsm.IsStringReceived("OK"))
          return 0;
     delay(500);
     gsm.WaitResp(5000, 100);


     delay(100);
     gsm.SimpleWriteln("AT+CIPSEND");
     switch(gsm.WaitResp(5000, 200, ">")) {
     case RX_TMOUT_ERR:
          return 0;
          break;
     case RX_FINISHED_STR_NOT_RECV:
          return 0;
          break;
     }
     gsm.SimpleWrite("MAIL From: <");
     gsm.SimpleWrite(from);
     gsm.SimpleWrite(">\n");
     gsm.SimpleWrite(end_c);
     gsm.WaitResp(5000, 100, "OK");
     if(!gsm.IsStringReceived("OK"))
          return 0;
     delay(500);
     gsm.WaitResp(5000, 100, "");

     delay(100);
     gsm.SimpleWriteln("AT+CIPSEND");
     switch(gsm.WaitResp(5000, 200, ">")) {
     case RX_TMOUT_ERR:
          return 0;
          break;
     case RX_FINISHED_STR_NOT_RECV:
          return 0;
          break;
     }
     gsm.SimpleWrite("RCPT TO: <");
     gsm.SimpleWrite(to);
     gsm.SimpleWrite(">\n");
     gsm.SimpleWrite(end_c);
     gsm.WaitResp(5000, 100, "OK");
     if(!gsm.IsStringReceived("OK"))
          return 0;
     delay(500);
     gsm.WaitResp(5000, 100, "");

     delay(100);
     gsm.SimpleWriteln("AT+CIPSEND");
     switch(gsm.WaitResp(5000, 200, ">")) {
     case RX_TMOUT_ERR:
          return 0;
          break;
     case RX_FINISHED_STR_NOT_RECV:
          return 0;
          break;
     }
     gsm.SimpleWrite("Data\n");
     gsm.SimpleWrite(end_c);
     gsm.WaitResp(5000, 100, "OK");
     if(!gsm.IsStringReceived("OK"))
          return 0;
     delay(500);
     gsm.WaitResp(5000, 100, "");

     delay(100);
     gsm.SimpleWriteln("AT+CIPSEND");
     switch(gsm.WaitResp(5000, 200, ">")) {
     case RX_TMOUT_ERR:
          return 0;
          break;
     case RX_FINISHED_STR_NOT_RECV:
          return 0;
          break;
     }
     gsm.SimpleWrite("Subject: ");
     gsm.SimpleWrite(subj);
     gsm.SimpleWrite("\n\n");

     return 1;
}

Ps: i was using this manual but dont work …

you need to update your IDE, use arduino IDE 1.0.6 & later version. It work on it.

I will try! thanks in advance ;)

Ok. I try with the followings but its not working…

inet.openmail(“aspmx.l.google.com”, “”, “”, “test@arduino.cc”,"xxxxx@gmail.com", “Test”);
gsm.SimpleWrite(“MESSAGGIO DI PROVA”);
inet.closemail();

inet.openmail(“smtp.gmail.com”, “myuserin64byteswith@gmail.com”, “mypaswordin64bytes”, “xxxx@gmail.com,"xxxxx@gmail.com", “Test”);
gsm.SimpleWrite(“MESSAGGIO DI PROVA”);
inet.closemail();

inet.openmail(“smtp.gmail.com”, “myuserin64byteswithout@gmail.com”, “mypaswordin64bytes”, “xxxx@gmail.com,"xxxxx@gmail.com", “Test”);
gsm.SimpleWrite(“MESSAGGIO DI PROVA”);
inet.closemail();

anyIdea? thanks!
ps: im not using an external power supply! but i really believe that must work in any case… or not?

paste your complete code with associate library ; let me try once

thanks!

#include "SIM900.h"
#include <SoftwareSerial.h>
#include "inetGSM.h"
//To change pins for Software Serial, use the two lines in GSM.cpp.
InetGSM inet;

int k=0;
int j=0;
char msg[150];
boolean found=false;
char data;
int numdata;
char inSerial[50]; 
int i=0;
boolean started=false;

void setup(){
     Serial.begin(9600);
     Serial.println("GSM Shield testing.");
     if (gsm.begin(2400)) {
          Serial.println("\nstatus=READY");
          started=true;
     } else Serial.println("\nstatus=IDLE");
     if(started) {
          if (inet.attachGPRS("web.tmovil.cl", "web", "web"))
               Serial.println("status=ATTACHED");
          else Serial.println("status=ERROR");
          delay(1000);
     }
}
//---------------------------------------------------------------------------------------
void loop(){ 
  serialhwread();
  serialswread();
  delay(1000);
}

void serialhwread(){
  i=0;
  if (Serial.available() > 0){
    while (Serial.available() > 0){
      inSerial[i]=(Serial.read());
      delay(10);
      i++;
    }
    inSerial[i]='\0';
    if(!strcmp(inSerial,"/END")){
      Serial.println("_");
      inSerial[0]=0x1a;
      inSerial[1]='\0';
      gsm.SimpleWriteln(inSerial);
    }//Send a saved AT command using serial port.
    if(!strcmp(inSerial,"EMAIL")){
      inet.openmail("smtp.gmail.com", "userin664bytes", "passin64bytes", "xxxx@gmail.com","xxxxg@gmail.com", "Test");
      gsm.SimpleWrite("MESSAGGIO DI PROVA");
      inet.closemail();
      Serial.println("enviado:]!");
    }
    else{
      Serial.println(inSerial);
      gsm.SimpleWriteln(inSerial);
    }
    inSerial[0]='\0';
  }
}           
           
void serialswread(){
     gsm.SimpleRead();
}

There someone who can give a hand with this? Will be nice if someone know how to send a email even just with the gsm library.

Thanks in advance!

Hi, do you have any news?

I'm trying to use the inet.openmail comand and i have same problem.

Thnx Luca