SMTP and Gmail... no longer working? | Thales IoT Developer Community
November 13, 2014 - 3:16am, 6082 views
Hi... so this is a strange error specifically around smtp and gmail using an EHS6
A while ago I was playing around with the AT command example for sending email as per the EHS6 AT command instruction set datasheet.
It worked just fine ....
Fast forward a few months and i fired up the exact same board but now smtp and gmail doesn't work.
On AT^SISO=9....
^SIS: 9,0,1000,"PARA-ERR: cmd must be set" (I always get this as I'm not using files but it doesn't seem to matter)
^SIS: 9,0,4400,"Smtp open(smtp.gmail.com:465)"
^SIS: 9,0,4400,"SSL-Info: TLS, 3.3, TLS\11ECDHE\1qRSA\11WITH\11AES\11128\11GCM\1
1SHA256"
^SIS: 9,0,4400,"SSL-Cert: C=US;O=Google Inc;CN=Google Internet Authority G2"
^SIS: 9,0,4400,F220 mx.google.com ESMTP nb3sm10668298pdb.18 - gsmtp"
^SIS: 9,0,4400,"250-mx.google.com at your service, \1b<49.184.39.240\1b>"
Then this error (after quite a wait..couple minutes or so)
^SIS: 9,0,400,"Unknown error -134 during socket::read "
Or
^SISE: 9,400,"Unknown error -123 during socket::read "
If I try an alternate port... (such as listed on GMail site)
^SIS: 9,0,1000,"PARA-ERR: cmd must be set"
^SIS: 9,0,4400,"Smtp open(smtp.gmail.com:587)"
Then immediate error...
^SIS: 9,0,50,"Fatal: Service has detected an internal error"
If I try a range of other smtp servers such as Yahoo or my own hosting provider it works just fine:
^SIS: 9,0,4400,"Auth OK"
^SIS: 9,0,4400,"Mail send OK"
^SISW: 9,2
All I have changed here is the server, user and password and they work just as the gmail one worked in the past.
I also tried a different SIM on a different network. Results are exactly the same.
I also tried a pc based smtp client and it seems to work ok with gmail also... though I wonder if it defaults to port 587
I have tried a different gmail account but we don't even seem to get to the authentication step and the result is the same.
So I am wondering if anyone else has had this issue (is it just me?) or thoughts on a solution?
Given Gmail is one of the more popular email providers, I really would like to get this feature working again but have run out of ideas.
For reference...
^SISS: 9,"srvType","Smtp"
^SISS: 9,"conId","0"
^SISS: 9,"address","smtps://user\00gmail.com:password\00smtp.gmail.com"
^SISS: 9,"tcpMR","10"
^SISS: 9,"tcpOT","6000"
^SISS: 9,"user","user\00gmail.com"
^SISS: 9,"passwd","*****"
^SISS: 9,"smFrom","user\00gmail.com"
^SISS: 9,"smRcpt","recpt\00gmail.com"
^SISS: 9,"smSubj","My Test Mail"
^SISS: 9,"smMsg","Hello ...This is the message."
^SISS: 9,"smAuth","login"
(details edited out)
Thanks!
Hi,
We are investigating the issue. I will inform you as soon as possible.
Best regards,
Bartłomiej
Hi,
Google has made some changes recently to increase security.
To login to the Google SMTP now you need to change the authentication type from "login" to "plain".
AT^SISS=9,smAuth,"plain"
However this is not enough - you will also need to do some changes in Google account configuration.
You can read about it here: https://support.google.com/accounts/answer/6010255
Here's the link to configuration change: https://www.google.com/settings/security/lesssecureapps
I was able to login to my account after these changes.
If you will still have problem try to login from the web page and check if Google doesn't display any additional screens before letting you to your mailbox.
It is also possible to implement SMTP protocol in java MIDlet and login using SecureConnection interface.
Best regards,
Bartłomiej