Hi team , I am getting the below error when i am trying the send the email to the registered user in my application Error creating Email. The underlying connection was closed: The connection was closed unexpectedly.
Hello @Prem Angappan
Please, In Service Center, go to Monitoring > Errors. Click "Detail" on the error. Look for a "Stack Trace." It might reveal if the error is happening during the Connect phase or the Authenticate phase.
If you can, shre the log in order we can gou deeper.
Goncalo Duarte Almeida
Please find the below message as there is no stack trace.
Message: Error creating Email. The underlying connection was closed: The connection was closed unexpectedly.
Environment InformationeSpaceVer: Id=4646, PubId=0, CompiledWith=11.22.0.39859RequestUrl: https://maiyar.qcc.gov.ae/Maiyar/moduleservices/log?clientTimeInMillis=1773397883585 (Method: POST)AppDomain: /LM/W3SVC/1/ROOT/Maiyar-118-134178619060157204FilePath: D:\...\PS\running\Maiyar.0377067907\ClientIp: 10.79.44.231 X-Forwarded-For: 10.79.45.19Locale: en-USDateFormat: yyyy-MM-ddPID: 3544 ('w3wp', Started='2/27/2026 10:45:16 AM', Priv=1410Mb, Virt=2120542Mb)TID: 71Thread Name:.NET: 4.0.30319.42000Client Runtime Packages: client-runtime-core= 3.33.0;client-runtime-view-framework-react= 3.10.0;client-runtime-widgets= 3.15.0;Client-Side Log
StackAction Name: SendCreateGroupUserMailEndpoint: screenservices/UserMangement_CW/ServiceAPISendCreateGroupUserMail System.Exception: Error creating Email. The underlying connection was closed: The connection was closed unexpectedly. at Object.s [as getException] (https://maiyar.qcc.gov.ae/Maiyar/scripts/OutSystems.js?EhsMqL9pM_HmXeF8zbDIkQ:2:10241) at c.onSuccess (https://maiyar.qcc.gov.ae/Maiyar/scripts/OutSystems.js?EhsMqL9pM_HmXeF8zbDIkQ:3:7240) at XMLHttpRequest. (https://maiyar.qcc.gov.ae/Maiyar/scripts/OutSystems.js?EhsMqL9pM_HmXeF8zbDIkQ:3:2648)
@Prem Angappan
Check this page in service center.
Here should appear error instead sent, please click inside and check info.
@Goncalo Duarte Almeida We cant able to find the logs in this logs page.before that itself we are getting the error message.
@Prem Angappan Can you share the error message?
Hi @Goncalo Duarte Almeida Please find the Below error message and log in the errors tabFor reference please check the first screenshot in the above chat.
This is appening only in Production?
Previouly already worked?
What changes?
This is appening only in Production? Yes we are able to reproduce only in the productionPreviouly already worked? Yes sometimes it is working and this issue is intermittently happening
No recent changes done.
Intermittent errors in a production environment could be also infrastructure or resource constraints, not code bugs, making it difficult to identify a pattern.
What you can do is add some logging actions to view in the Service Center -> General trying to find out where the failure occurred.
Looks like this is not with the code but with the configuration at the environment level.
Please check if this helps.
Service Center → Administration → Email: set SMTP server, port, and auth. Click “Send Test Email” there to reproduce and view the exact stack trace in Monitoring → Error Log (filter Source=eSpaceName, Type=Email). Also check General and Integration logs for TLS or DNS hints.
Thanks,
Saicharan
If this were a configuration issue, then all emails should be failing, which is not what's happening. The problem is intermittent, and the logs provided so far are too general to help identify the root cause.
Hi @Prem Angappan
The first and most important step is to understand what the error actually conveys:
Error:
This error does not originate in the UI or client runtime. It is thrown by the server‑side email sending process when OutSystems tries to open or maintain a connection to the SMTP server and that connection is terminated before completion.
This exact message is widely documented in OutSystems as a network / transport‑level failure, not a logic or code defect.
Please refer to the discussion link here. This might give you more context.
Best
Saugat