Company: Link Technologies
Case No: L12676. Project: 13.30: LinkSOFT Version 13.30
Logged By: Sanjay (Link Technologies) on 14 Feb 2022 01:19PM
Priority: High
Product: Framework
Group: Software Defect
Time Taken: 27.00 (Weight: 32.00)
Version: 13.30
Assigned To: Development
Circulation: Development, Sanjay, Sitla Sharma, Vineshwar Prasad
Resolve By: Thursday, 10 February 2022 11:59 PM [794 days since logged date]
Status: Closed
Subject: Failure sending Emails when using Exchange server
Summary:    
1. Problem Details

Failure sending Emails. All system Notifications, Payslips, Alert are failing.

2. Environment Details

Version - 12.30.0224.GA
Audit Notes:Edited by sanjay on 22/02/22 15:16. Edited by sanjay on 18/02/22 10:15. Edited by sanjay on 14/02/22 13:19. Edited by sanjay on 14/02/22 13:18. 
09 Feb 202209:39AM Comment 1 by Vineshwar Prasad (Edge Business Solutions) Assigned To: Vineshwar Prasad (Edge Business Solutions) Followup Date: 10-02-2022 09:32 AM Time Taken: 0.50 Notes: Edited by sanjay on 14/02/22 13:20. Edited by vineshwar on 09/02/22 09:46. Edited by vineshwar on 09/02/22 09:45. ETC extended from: 10/02/2022 to 10/02/2022
***** Skype Conversation with Sanjay Singh - 23/12/2021 *****

Vineshwar, 10.17 AM
Hi Sanjay, VT Solutions is using an Exchange Server with SMTP as mail.{REDACTED}
There emails are failing and they have mentioned that we need to upgrade TLS.
Is there anything as such from our end that may be causing the failures.

Sanjay, 4:04 PM
Hi Vineshwar, what version are they on?

Vineshwar, 5:29 PM
12.30.0224.GA

09 Feb 202209:48AM Comment 2 by Vineshwar Prasad (Edge Business Solutions) Assigned To: Vineshwar Prasad (Edge Business Solutions) Followup Date: 09-02-2022 09:45 AM Time Taken: 0.25 Notes: Edited by vineshwar on 09/02/22 09:58. 
***** Skype Conversation with Sanjay Singh - 30/12/2021 *****

Sanjay, 2:09 PM
Hi Vineshwar, case number?

The mail client we use in V13 uses TLS1.2 by default, I will have to check the version 12.

Can you install 13.2 on their test server and verify?

09 Feb 202209:52AM Comment 3 by Vineshwar Prasad (Edge Business Solutions) Assigned To: Vineshwar Prasad (Edge Business Solutions) Followup Date: 10-02-2022 09:48 AM Time Taken: 1.00 Notes: ETC extended from: 10/02/2022 to 10/02/2022
Bula Team,

We have Upgraded the client to version 13.20.1215.GA as per the case E01756 on 25/01/2021.

We have advised Monica that the Emails are still failing and they need to verify if the SMTP details are correct.

Regards
Vineshwar Prasad

09 Feb 202209:57AM Comment 4 by Vineshwar Prasad (Edge Business Solutions) Assigned To: Vineshwar Prasad (Edge Business Solutions) Followup Date: 10-02-2022 09:54 AM Time Taken: 1.00 Notes: ETC extended from: 10/02/2022 to 10/02/2022
Bula Team,

We did a Microsoft Teams meeting with Abdul Amaan and verified the following;
  1. Email Scheduler was enabled and running under Global Administration -> Process Setup
  2. Process SYS009 was enabled and running under Company Administration -> Processes
  3. Verified SMTP Details as below;
    • SMTP - mail.aus.exch690.serverdata.net
    • Port - 587
    • SSL - true
    • UserName - payslips@universalpayrollservices.com
    • Password - ******
Log Data: {"ClassName":"System.Net.Mail.SmtpException","Message":"Failure sending mail.","Data":null,"InnerException":{"ClassName":"System.IO.IOException","Message":"Authentication failed because the remote party has closed the transport stream.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)\r\n at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)\r\n at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)\r\n at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)\r\n at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)\r\n at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)\r\n at System.Net.TlsStream.CallProcessAuthentication(Object state)\r\n at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)\r\n at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)\r\n at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)\r\n at System.Net.Mail.SmtpConnection.Flush()\r\n at System.Net.Mail.ReadLinesCommand.Send(SmtpConnection conn)\r\n at System.Net.Mail.EHelloCommand.Send(SmtpConnection conn, String domain)\r\n at System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)\r\n at System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint)\r\n at System.Net.Mail.SmtpClient.GetConnection()\r\n at System.Net.Mail.SmtpClient.Send(MailMessage message)","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nStartReadFrame\nSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Net.Security.SslState\nVoid StartReadFrame(Byte[], Int32, System.Net.AsyncProtocolRequest)","HResult":-2146232800,"Source":"System","WatsonBuckets":null},"HelpURL":null,"StackTraceString":" at System.Net.Mail.SmtpClient.Send(MailMessage message)\r\n at LT.CORE.BLL.EmailManagerBLL.SendEmail(LinkEmailEntity emailEntity) in C:\\Source - LinkSOFT\\LinkTechnologiesCore - 2.0\\BLL\\EmailManagerBLL.cs:line 130","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nSend\nSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Net.Mail.SmtpClient\nVoid Send(System.Net.Mail.MailMessage)","HResult":-2146233088,"Source":"System","WatsonBuckets":null,"Status":-1}

Sent a test Mail from Email Logs however this fails. We will get our technical team to diagnose further and advise.

Regards
Vineshwar Prasad

09 Feb 202211:16AM Comment 5 by Vineshwar Prasad (Edge Business Solutions) Assigned To: Vineshwar Prasad (Edge Business Solutions) Followup Date: 10-02-2022 11:15 AM Time Taken: 0.25 Notes: ETC extended from: 10/02/2022 to 10/02/2022
---- Email From: Abdul Amaan <amaan@vt-solutions.com> Date: Wed, Feb 9, 2022 at 12:10 PM -----

Hello Vineshwar,

As discussed please escalate this to you engineers in Australia, we need to work with them and resolve asap please.

Attached feedback from our email host team

I have tested the mail relay, and if I use a client using TLS 1.0 or TLS 1.1, I get the same error message that you are getting. "authentication failed because the remote party has closed the transmission stream".
I I use the same software, but enure that it is only using TLS 1.2 - I get a successful authentication and the mail is relayed.

11 Feb 202201:52PM Comment 6 by Sanjay (Link Technologies) Assigned To: Development Followup Date: 11-02-2022 01:09 PM Time Taken: 2.00 Notes: Edited by sanjay on 14/02/22 11:04. 

Hi Vineshwar, 

LinkSOFT Version 12 uses Dot Net Framework 4.6 which uses TLS 1.2 by default. LinkSOFT 13 uses DOT NET Framework 4.8

You can check which version of DOT Net your installation is using by looking at the web.config. Tag: 

<system.web>
<compilation targetFramework="4.8">

Here is an example of SMTP settings for you to check on site:

<smtp from="Fujitsu Automated Email &lt;Fujitsu-Automated@Fujitsu.com.au&gt;">
    <network host="smtp.office365.com" port="587" enableSsl="true" password="######" userName="NoReply@Fujitsu.com.au" />
</smtp>

If you want, I can connect via teams with you and we can have a look.

Regards
Sanjay


11 Feb 202203:39PM Comment 7 by Sanjay (Link Technologies) Assigned To: Development Followup Date: 11-02-2022 03:37 PM Time Taken: 1.00
Hi Vineshear, Just FYI - I was able to send emails using 13.20 using the credentials provided. As discussed, please set this up in QA2 with the production version and verify.  Thanks.

14 Feb 202201:18PM Comment 8 by Sanjay (Link Technologies) Case L12676 added to project 13.20
14 Feb 202201:19PM Comment 9 by Sanjay (Link Technologies) Case L12676 added to project 13.30
14 Feb 202201:23PM Comment 10 by Sanjay (Link Technologies) Assigned To: Development Followup Date: 14-02-2022 07:20 PM Time Taken: 16.00 Notes: Edited by sanjay on 14/02/22 13:25. 
PART A - Development work for this case has been completed.

1. The change will be available in versions: 13.30 and PATCH 13.20.0214

2. The following changes were made(Include Database object names, Program classes, and any other relevant information):

  1. Added Auto detect on SSL and TLS encryption. Where clients are using TLS, we have forced TLS1.2 and 1.3

3. Affected Areas:

  1. Framework - Sending emails

4. The issue was caused by:

  1. Allow for TLS encryption

5. Other Relevant Notes
6. Next Step
(Review and System Test (Developer) -> UAT (Quality) -> Documentation): UAT


PART B -
Development Reference (Place descriptor for objects changed)
: Update to DLL which needs to be placed in the Web Sites BIN folder.



14 Feb 202202:02PM Comment 11 by Sanjay (Link Technologies) Assigned To: Development Followup Date: 14-02-2022 08:01 PM Time Taken: 1.00
Just FYI - the "From Email address" is important. If using Clients smtp, you have to either leave the Global Configuration for "From Address" blank or use the clients email address.

There is no way to edit the "From Address" once the email is queued in version13.20. I have added the Edit capability in 13.30

15 Feb 202209:47AM Comment 12 by Sanjay (Link Technologies) Assigned To: Development Followup Date: 15-02-2022 03:46 PM Time Taken: 4.00
The following tests were performed:

Table 1 - Test Results
NoTest CaseExpected ResultPass/FailComments
1Test Email and Report Emails with Exchange server using TLS 1.2

Sending emails success with Gmail
Sending Email success with Exchange Server

Pass

2Can Edit EmailFrom in menu "Business Intelligence ~> Email log"

Pass

3Process Source is reset on Editing Email Log

Pass

4



5



Environment Details

  1. OS version: Win10
  2. Application version:13.30
  3. Setup on:
    1. Server: LinkQA4
    2. Database: LinkSOFT
    3. LinkSOFT URL: HTTP://LinkQA4/LinkSOFT
  4. Login Details: Standard username and password for user "admin"

Next Step: Closure


18 Feb 202210:15AM Comment 13 by Sanjay (Link Technologies) ETC was changed from 10/02/2022 to 10/02/2022
If you have any queries regarding this support incident, please email admin@linktechnologies.com.au and include the Case No: L12676 in the subject line of all emails regarding this issue.

Document size: 17.9 KB
For call complaints, please contact the Managing Director of the company using this form