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;
readCustomParams();
DataTable mailBoxes = DataLoad.readDBValues();
for (int mbId = 0; mbId < mailBoxes.Rows.Count; mbId++)
{
try
{
bool bodyasImage = readDBColumns(mailBoxes, mbId);
ArrayList Attachments = new ArrayList();
string myex = "";
try
{
//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);
email.OpenInbox();
}
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..