How to send an E-mail using TC65 ? Part 2 | Telit Cinterion IoT Developer Community
July 21, 2015 - 10:34am, 6932 views
Dear sir.
Acording to varios pdf document it should be easy to send an e-mail.
If I send a at^sisw=9,string-lenght, I get the response -> at^sisw=9,7
^SISW: 9, 7, 0 <- that is ok
Next I aught to send message using -> atcommand.send("at^sisw=" + 9 + "," + e_message + (char) 26 + "\r");
but I get this ->
Exception java.lang.IllegalStateException: Error sending AT Command, ongoing data connection.
So, how to send data as string?
Hello,
First thing I can see here is that you didn't enter the valid server address but IP from the private pool.
And you should set "smAuth" to 1.
Regards,
Bartłomiej
I fact I do have tryed, but this what comes up afther reset.
^SYSSTART
^SSIM READY
AT^SICS=5,conType,"GPRS0"
0
AT^SICS=5,apn,"internet"
0
at^siss=9,conId,"5"
0
at^siss=9,srvType,"smtp"
0
at^siss=9,smFrom,"user@user"
0
at^siss=9,smRcpt,"user@user"
0
at^siss=9,smSubj,"Just a test"
0
at^siss=9,address,"192.168.1.2"
0
at^siss=9,smAuth,"1"
0
AT^SISS=9,user,"user@user"
0
AT^SISS=9,passwd,"user"
0
AT^SICS?
^SICS: 0,"conType",""
^SICS: 1,"conType",""
^SICS: 2,"conType",""
^SICS: 3,"conType",""
^SICS: 4,"conType",""
^SICS: 5,"conType","GPRS0"
^SICS: 5,"alphabet","0"
^SICS: 5,"user",""
^SICS: 5,"passwd","*****"
^SICS: 5,"authMode","PAP"
^SICS: 5,"apn","internet"
^SICS: 5,"inactTO","20"0
at^siss?
^SISS: 0,"srvType",""
^SISS: 1,"srvType",""
^SISS: 2,"srvType",""
^SISS: 3,"srvType",""
^SISS: 4,"srvType",""
^SISS: 5,"srvType",""
^SISS: 6,"srvType",""
^SISS: 7,"srvType",""
^SISS: 8,"srvType",""
^SISS: 9,"srvType","Smtp"
^SISS: 9,"conId","5"
^SISS: 9,"alphabet","0"
^SISS: 9,"address","192.168.1.2"
^SISS: 9,"user","user@user.dk"
^SISS: 9,"passwd","*****"
^SISS: 9,"smFrom","user@user.dk"
^SISS: 9,"smRcpt","user@user.dk"
^SISS: 9,"smCC",""
^SISS: 9,"smSubj","Just a test"
^SISS: 9,"smHdr",""
^SISS: 9,"tcpPort","25"
^SISS: 9,"smAuth","1"
^SISS: 9,"tcpMR","10"
^SISS: 9,"tcpOT","6000"0
AT^SISO=9 <- open
0
^SISW: 9, 1
AT^SISI=9 <- query
^SISI: 9,3,0,0,0,00
AT^SISI=9
^SISI: 9,3,0,0,0,00
AT^SISI=9
^SISI: 9,3,0,0,0,00
AT^SISC=9 <-shut down
0
And this too:
at^siss=9,address,"mail.oelbye.dk"
0
AT^SISO=9
0
^SISW: 9, 1
AT^SISI=9
^SISI: 9,3,0,0,0,00
AT^SISI=9
^SISI: 9,3,0,0,0,00
AT^SISC=9
0
Hello,
According to SISI the service is still in the connecting state.
There's another thing that I can think about - you are using quite an old module which has no support for SMTPS. I have tested this scenario with my email provider and it was working. But it's possible that for security reason your email provider does not allow insecure connections to SMTP server on port 25.
Regards,
Bartłomiej