Email Issue | Telit Cinterion IoT Developer Community
May 7, 2015 - 1:05am, 6336 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^siss=1, srvType, SMTP
at^siss=1, conID, 0
at^siss=1, address, auth.smtp.1and1.co.uk
at^siss=1, smAuth, 1
at^siss=1, passwd, ******
at^siss=1, user, ***@******.co.uk
at^siss=1, smFrom, ***@******.co.uk
at^siss=1, smRcpt, ***x@***xx.com
at^siss=1, smsubj, "Test"
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.
Have you ckecked if your SMTP server ***** SSL security and a certificate?
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
Have you configured the internet connection profile with AT^SICS command?
You can find example here:
Here's also the example from the AT commands specification:
at^sics=0,conType,GPRS0 Select connection type GPRS0.
AT^SICS=0,"inactTO", "20" Inactivity timeout = 20s.
AT^SICS=0,dns1,"184.108.40.206" IP address of Primary DNS server.
AT^SICS=0,passwd,t-d1 Password for GPRS services provided by the German
AT^SICS=0,apn,"internet.t-d1.de" APN to access the GPRS services provided by the
German operator T-D1.
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.
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:
+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:
+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.
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.
AT^SISS=9,conId,"1" //Select connection profile 1.
//Specify SMTP server address, enter user name and password for SMTP authentication.
AT^SISS=9,smSubj,"My Test Mail" //Enter text for subject field.
AT^SISS=9,smFrom,"firstname.lastname@example.org" //Sender's email address.
//Recipients' email addresses.
//Type of authentication: Sender name and password are used for SMTP authentication.
AT^SISS=9,smMsg,"This is the message for mailtesting."
//Write message text.
AT^SISS=9,path,"file:///a:/data/" //Specify path on local FFS.
AT^SISS=9,cmd,"files" //Send attachment located on FFS.
It seems that your address is not formatted correctly - the pattern for smtp would be:
Additionally when GSM alphabet is enabled (see AT+CSCS) keep in mind that character
"@" shall be escaped with \\00.
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.
^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
^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.
^SIS: 1,0,4400,"Auth OK"
^SIS: 1,0,4400,"Mail send OK"
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.