sherazi
Banned
- Joined
- Feb 15, 2010
- Messages
- 388
- Helped
- 61
- Reputation
- 126
- Reaction score
- 61
- Trophy points
- 1,318
- Location
- Muscat, Oman, Oman
- Activity points
- 0
can u please share the firmwareRevision: 1137B10SIM900M64_ST_Email_TEST_20111103 << this works
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 void Bearer_profile (void) { Server_Actv = 1; GSM("AT+SAPBR=2,1"); // test connection ? _delay_ms(400); if(!APMSTS) //if not connected . connect now! { GSM("AT+CREG?"); _delay_ms(50); GSM("AT+SAPBR=4,1"); _delay_ms(400); GSM("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\""); _delay_ms(5); GSM("AT+SAPBR=3,1,\"APN\",\"claro.com.br\""); _delay_ms(5); GSM("AT+SAPBR=3,1,\"USER\",\"claro\""); _delay_ms(5); GSM("AT+SAPBR=3,1,\"PWD\",\"claro\""); _delay_ms(5); GSM("AT+SAPBR=1,1"); _delay_ms(4500); } GSM("AT+SAPBR=2,1"); _delay_ms(2000); Server_Actv = 0; } void send_email_via_yahoo (void) { Server_Actv = 1; GSM("AT+EMAILCID=1"); _delay_ms(10); GSM("AT+EMAILTO= time_out"); //time out 20...120 sec //resp ok _delay_ms(10); GSM("AT+SMTPSRV=\"smtp.mail.yahoo.com.ar\",587"); //resp ok _delay_ms(10); // smtp server port GSM("AT+SMTPAUTH=1,\"GPRS.123456789@yahoo.com.ar\",\"*********\""); //resp ok _delay_ms(10); // sender mail key GSM("AT+SMTPFROM=\"gprs.123456789@yahoo.com.ar\",\"Andres-GPRS\""); //resp ok _delay_ms(10); // sender GSM("AT+SMTPRCPT=0,0,\"abcdefghijk@gmail.com\",\"andres\""); //resp ok _delay_ms(100); // GSM("AT+SMTPSUB=\"TEST_GPRS\""); //resp ok _delay_ms(10); P_ROMT = 0; USART0_TX ("AT+SMTPBODY"); //resp ok GSM("AT+SMTPBODY"); while(!P_ROMT){_delay_ms(50);} // sistem promp .... ? >> GSM("CUERPO DEL E-MAIL. enviado por GPRS modem a 17 min de intervalo "); GSM(" "); GSM(" "); _delay_ms(10); GSM_BYTE(0x1A); // transact end _delay_ms(10); SMTPSEND_OK = 0; GSM("AT+SMTPSEND"); // send this while(!SMTPSEND_OK){ W_delay(time_out);}; Server_Actv = 0; }