Exception occur when fetching mails by C# code.

gauravluxor

Registered
Oct 11, 2019
1
0
1
India
cPanel Access Level
Website Owner
An exception occurred when reading mails from C# code by using "synapseMailContentReader" library. Attached is the screenshot of the exception. I have 2 mail ids, for 2nd one we are getting result but exception occurs for the 1st one Both the mail ids are on the same server. Please provide a solution.

Code -
List<Mails> obj = MailReader.ReadMails(emailServer.server, emailServer.port, emailServer.isSSL, emailServer.username, emailServer.password, emailServer.lastMailDate);

Exception -
The stream used to retrieve responses from was closed.
 

Attachments

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,273
1,281
313
Houston
Can you explain what if any errors are noted on the cPanel server when attempting to connect? They'd be listed in /var/log/maillog or /var/log/exim_mainlog from the information you've provided, this looks to be unrelated to cPanel/WHM