Click here to Skip to main content
15,668,923 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am really in trouble.I need your urgent help..Let me explain me the issue below:

We have a window service, which receives emails from various senders and process their attachments.

We have a sender, who uses RedHat (Linux) as their EmailClient.

So our problem is we are not able to decode their attachments and also the Email. Below is the code snipet we use to create mail object and further processing.

Pop3MailClient email = null;
DataTable mailBoxes = DataLoad.readDBValues();
for (int mbId = 0; mbId < mailBoxes.Rows.Count; mbId++)
bool bodyasImage = readDBColumns(mailBoxes, mbId);
ArrayList Attachments = new ArrayList();
string myex = "";
//Log(String.Format("POP3SERVER {0}, POP3PORT {1}, useSSL {2}, USERNAME {3}, PASSWORD {4}", POP3SERVER, Int32.Parse(POP3PORT), useSSL, USERNAME, PASSWORD));
email = new Pop3MailClient(POP3SERVER, Int32.Parse(POP3PORT), useSSL, USERNAME, PASSWORD);
email.Warning += new WarningHandler(this.EmailWarningHandler);
catch (Exception ex)
myex = USERNAME + ":Error connecting to POP3 Server: " + ex.Message;
throw new Exception(myex);

Now the issue is we get false value for the below:
if (email.HasAttachments){}

Please helpppppppp... Save my life..

1 solution

As you are using SharpMimeTools to parse the email message using the SharpMessage class you should ask your question on the forums for the SharpMimeTools project[^] as it would appear that the problem is with the SharpMessage class.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900