Page 1 of 1
Office 365 - Sending emails
Posted: Wed Dec 14, 2016 9:08 am
by Daniel
Hi,
We currently use the CnSmtpConnection class to send emails from Jade via a local Exchange Server.
However one of our clients is moving to Office 365, and this will mean we have to send via the Office 365 cloud.
I see that Microsoft does have a method where you can authenticate with an Office 365 mailbox and then send using SMTP client submission. This uses the server name 'smtp.office365.com', but of course requires the username/password of the hosted mailbox being used.
Has anyone done this in Jade?
Any ideas would be appreciated.
Thanks
Daniel
Re: Office 365 - Sending emails
Posted: Thu Dec 15, 2016 3:42 am
by ghosttie
We ended up making a .NET helper DLL (using the System.Net.Mail.SmtpClient class) because at the time CnSmtpConnection didn't support authentication, but apparently they've added it since then, along with TLS.
Instructions for how to use them are in the documentation.
Re: Office 365 - Sending emails
Posted: Fri Dec 16, 2016 3:25 pm
by Daniel
Thanks for the great reply.
We have upgraded a copy of a 6.3 jade system to 7.1.08 and updated the cardschema/karma dlls.
The CnSmtpConnection does now have the authentication and TLS option.
However when testing the sending of an email via smtp.office365.com with TLS enabled (as required in the ini file), jade fails to connect.
There is an SSL error in the jommsg log stating 'SSL_connect error in SSLv3 read server hello A' and 'SSL3_GET_RECORD:wrong version number'.
Office 365 requires TLS V1.0 or above, and SSL V3 is older and not compatible -but it seems that enabling TLS in Jade is not TLS but perhaps an older SSL version??
If I turn off TLS, then a tcp connection is established but the email is not sent (as expected since office365 requires TLS 1.x). This does seem to point to a TLS version issue?
Opions/ideas would be much appreciated.. Thanks!
Re: Office 365 - Sending emails
Posted: Fri Dec 16, 2016 5:10 pm
by JohnP
Don't know about CnSmtpConnection, but JADE seems to support TLS 1.1 and 1.2. From the 7.1.08 RelInfo.pdf:
Application Server OpenSSL Cipher Suite (NFS 61541)
In earlier JADE releases, only the TLSv1 protocol was supported.
JADE now supports TLS 1.1 and TLS 1.2. You can now specify the TLSv1.1 or TLSv1.2 value in the
SSLMethodName parameters in the [JadeThinClient] and [JadeAppServer] sections of the JADE initialization file.
In addition, the methodType property in the JadeSSLContext class now supports the new MethodTLSv1_1 and
MethodTLSv1_2 constants defined in the JadeSSLContext class.
So maybe it's the TLS version in CnSmtpConnection?
Re: Office 365 - Sending emails
Posted: Tue Dec 20, 2016 9:07 am
by Daniel
Thanks John
I checked the methodType property value in the JadeSSLContext class when it is used by CnSmtpConnection etc to send an email. It does get set to TLS 1.0
I tried 1.1 and 1.2 but it made no difference unfortunately. We'll get Jade to have a look at this
Re: Office 365 - Sending emails
Posted: Mon Dec 10, 2018 1:28 pm
by stevek2
We are in a similar position whereby our client switched their emails to Office365 and have hit the same hurdle
(emails were working fine when using default SMTP server or relay)
We use Jade 7.1.09 and latest Cardschema required for this version of Jade and same problem in that Office365 is not processing our emails sent using cnSMTPConnection.
Has there been any response on this (from Jade) or solution that others have found?
Regards
Steve