Email Issue | Telit Cinterion IoT Developer Community
May 7, 2015 - 1:05am, 6319 views
I am getting an error when trying to open a connection for transmitting an email. The following is the code and responses. The error suggests the issue is with establishing an Internet connection, rather than the email commands. I would appreciate any help in establishing why there is an issue with establishing an Internet connection:
at_CREG?
+CREG:0,1
OK
at^sisi?
OK
at^siss=1, srvType, SMTP
OK
at^siss=1,alphabet,1
OK
at^siss=1, conID, 0
OK
at^siss=1, address, auth.smtp.1and1.co.uk
OK
at^siss=1, smAuth, 1
OK
at^siss=1, passwd, ******
OK
at^siss=1, user, ***@******.co.uk
OK
at^siss=1, smFrom, ***@******.co.uk
OK
at^siss=1, smRcpt, ***x@***xx.com
OK
at^siss=1, smsubj, "Test"
OK
at^siss?
^SISS: 0,"srvType",""
^SISS: 1,"srvType","Smtp"
^SISS: 1,"conId","0"
^SISS: 1,"alphabet","1"
^SISS: 1,"address","auth.smtp.1and1.co.uk"
^SISS: 1,"tcpMR","10"
^SISS: 1,"tcpOT","6000"
^SISS: 1,"user","***x@******.co.uk"
^SISS: 1,"passwd","*****"
^SISS: 1,"smFrom","***x@******x.co.uk"
^SISS: 1,"smRcpt","***x@******.com"
^SISS: 1,"smSubj","Test"
^SISS: 1,"smAuth","1"
^SISS: 2,"srvType",""
^SISS: 3,"srvType",""
^SISS: 4,"srvType",""
^SISS: 5,"srvType",""
^SISS: 6,"srvType",""
^SISS: 7,"srvType",""
^SISS: 8,"srvType",""
^SISS: 9,"srvType",""
OK
at^siso=1
ERROR
Thus not actually getting to a stage to transmit any data.
If you issue AT+CMEE=2 do you get any more detailed error?
With AT+CMEE=2 no additional information is generated.
Hi,
Have you ckecked if your SMTP server ***** SSL security and a certificate?
Regards
Antonio
Somewhere over the rainbow!!! Looking for the Oz Land!!!
When I was using my Gmail account for sending mail with BGS5T I had to do this: https://www.google.com/settings/security/lesssecureapps
Hello,
Have you configured the internet connection profile with AT^SICS command?
You can find example here:
https://iot-developer.thalesgroup.com/tutorial/concept-board-internet-se...
Here's also the example from the AT commands specification:
at^sics=0,conType,GPRS0 Select connection type GPRS0.
OK
AT^SICS=0,"inactTO", "20" Inactivity timeout = 20s.
OK
AT^SICS=0,dns1,"193.254.160.1" IP address of Primary DNS server.
OK
AT^SICS=0,passwd,t-d1 Password for GPRS services provided by the German
operator T-D1.
OK
AT^SICS=0,apn,"internet.t-d1.de" APN to access the GPRS services provided by the
German operator T-D1.
OK
You can also find nice examples for email in this document.
I think that in case of SSL or similar configuration issue the SISO would return OK and you would have some errors later.
Best regards,
Bartłomiej
Thank you for your responses.
Yes I have configured the Internet connection profile, but I don't know how to check whether the issue is with the Internet connection profile (or login details) and / or the Email Service Profile.
I also tried a FTP transfer, in case it was a a SSL issue, this time I received some CME error info:
AT^SISO=1
+CME ERROR: operation not allowed.
Still not sure where the errors(s) are.
The Internet Connection Profile used:
AT^SICS=0, conType, gprs0
AT^SICS=0, user, ""
AT^SICS=0, passwd, ""
AT^SICS=0, apn, orangeinternet
Also tried apn, everywhere since EE took over Orange, but no difference.
Executing the commands directly from HyperTerminal rather than from within Java within Netbeans gives further info:
at^siso=1
+CME ERROR: operation not allowed
^SIS: 1,0,1000. "PARA-ERR: Address wrong.
This seems to imply the AT^SISS=1, address, auth.smtp.1and1.co.uk is wrong, but I cannot see why.
Hello,
You could try to follow the example from the link I sent you or at commands specification to verify the internet connection profile.
I paste you the smtp example from AT commands specification document (it may not work with gmail now becase they have changed the security settings - please see more here https://iot-developer.thalesgroup.com/threads/smtp-and-gmail-no-longer-w...):
AT^SISS=9,srvType,"Smtp" //Select service type SMTP.
OK
AT^SISS=9,conId,"1" //Select connection profile 1.
OK
AT^SISS=9,address,"smtps://Username@gmail.com:********@smtp.gmail.com"
//Specify SMTP server address, enter user name and password for SMTP authentication.
OK
AT^SISS=9,smSubj,"My Test Mail" //Enter text for subject field.
OK
AT^SISS=9,smFrom,"subscriber1@gemalto.com" //Sender's email address.
OK
AT^SISS=9,smRcpt,"subscriber2@gmail.com,subscriber3@gemalto.com"
//Recipients' email addresses.
OK
AT^SISS=9,smAuth,"login"
//Type of authentication: Sender name and password are used for SMTP authentication.
OK
AT^SISS=9,smMsg,"This is the message for mailtesting."
//Write message text.
OK
AT^SISS=9,path,"file:///a:/data/" //Specify path on local FFS.
OK
AT^SISS=9,cmd,"files" //Send attachment located on FFS.
OK
AT^SISS=9,files,"flower.jpg"
OK
It seems that your address is not formatted correctly - the pattern for smtp would be:
"smtp[s]://[<user>:<passwd>@]<host>[:<Port>]"
Additionally when GSM alphabet is enabled (see AT+CSCS) keep in mind that character
"@" shall be escaped with \\00.
Best regards,
Bartłomiej
Thank you for your help and patience in helping to resolve the issues. Made some progress in that an email plus attachment was being transferred, but although the email was received, plus the Email msg, the attachment file was received but no contents!!. The resposes given below don't appear to give any information on whether the attachment was also successfully transferred.
This occurred when a *.txt or a *.jpg attachment was transferred. My initial thoughts are this cannot be a security, SSL type issue, since I would not expect any attachment (file) rather than an empty file. Any thoughts ??
My second query is that Emails may be sent at random periods. The next time an Email is required to be sent would I just need to send AT cmds for items that have changed, ie from Subject onwards or would I need to repeat the whole Internet Service Profile ??
If I needed to maintain the connection by sending a 'ping', which uses the conType GPRSO, does this mean the next time I send an Email I would need to repeat the whole Internet Service Profile??
Below are the responses received at the EHS6T end.
at^siso=1
OK
^SISW: 1,1
at^SISc=1
OK
^SIS: 1,0,4400,"Smtp open(auth.smtp.1and1.co.uk:465)"
^SIS: 1,0,4400,"SSL-Info: TLS, 3.3, TLS\11DHE\11RSA\11WITH\11AES\11256\11GCM\11S
HA384"
^SIS: 1,0,4400,"SSL-Cert: C=US;O=thawte, Inc.;CN=thawte SSL CA - G2"
^SIS: 1,0,4400,"220 kundenserver.de (mreue101) Nemesis ESMTP Service ready"
^SIS: 1,0,4400,"250-kundenserver.de Hello \1b<auth.smtp.1and1.co.uk\1b> \1b<213.
205.232.100\1b>"
^SIS: 1,0,4400,"Auth OK"
^SIS: 1,0,4400,"Mail send OK"
^SISW: 1,2
Hello,
I think it's possible that the mail server has cut the content from the attachment file.
You don't need to renter all the commands each time. Please use AT^SISS? and AT^SICS? to check the current configuration.
Regards,
Bartłomiej