smtp connection to Office 365 | Telit Cinterion IoT Developer Community
September 25, 2017 - 10:27am, 2568 views
Hi,
has anyone managed to use smtp with Office 365 from a BGS5T modem or similar. I've managed to get it working with gmail but authentification seems to be an issue with Office 365. I had various errors reported back after trying various configurations but with it set to what I think is right I just get situation as below
at^siss?
^SISS: 0,"srvType",""
^SISS: 1,"srvType","Smtp"
^SISS: 1,"conId","0"
^SISS: 1,"address","smtps://user\00madeup.co.uk:passwd\00smtp.office365.com:587"
^SISS: 1,"tcpMR","10"
^SISS: 1,"tcpOT","6000"
^SISS: 1,"path","file:///a:/"
^SISS: 1,"files","data2.txt"
^SISS: 1,"cmd","files"
^SISS: 1,"smFrom","user\00madeup.co.uk"
^SISS: 1,"smRcpt","another\00dmadeup.co.uk"
^SISS: 1,"smSubj","My Test Mail"
^SISS: 1,"smMsg","This is the message for mail testing."
^SISS: 1,"smAuth","plain"
This produces the following messages
^SIS: 1,0,4400,"Smtp open(smtp.office365.com:587)"
^SIS: 1,0,50,"Fatal: Service has detected an internal error"
The account emails and "From" fields are a valid Office 365 accounts.
Hello,
Please provide the firmware version of the module (ATI1 command).
Regards,
Bartłomiej
Hi,
Thanks for taking an interest. Information requested below. Further research would seem to suggest I need authentication certificates for TLS. A completely dark area to me!
ati1
Cinterion
BGS5
REVISION 01.100
A-REVISION 00.000.18
Hello,
You only need to load a client certificate on the module if the server requires to validate your certificate. Or you can load the server root certificate if you want to validate the server certificate. If you only want to connect over a secure link you don't need to load anything on the module.
You can see this tutorial for connection to Amazon cloud with certificates and mutual authentication:
https://iot-developer.thalesgroup.com/showcase/concept-board-connection-...
Your firmware is not the latest available and may not work with this tutorial (the newer one may support more certificate types) but the newer A-REVISION 00.000.21 should do.
As for your log the address seems strange - the format should be "smtp[s]://[<user>:<passwd>@]<host>[:<Port>]".
Regards,
Bartłomiej