Base 64 Execption While Fetching Mails

Sep 13, 2012 at 8:11 AM

i m getting execption while fetching mails-

 

The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters. 

 

plz chk that problem .

( i think it happens if The DISPLAY NAME  Contains more than two words . its just our guess.)

plz help us waiting for u r great help.:)

Coordinator
Sep 13, 2012 at 8:25 AM
Edited Sep 13, 2012 at 8:38 AM

I'll fix it, but it would be easier to figure out, if you could send me a test message to p13a92@googlemail.com

Same as you're testing your code with and receive this exception

Sep 13, 2012 at 8:39 AM

sorry but we dont have permisstion to sent email which we r useing.

but according to use getting problem in TO field in which Display Name is in three words

abc pqr xyz < abcd@pqr.com >

plz chk it

thanks

Coordinator
Sep 13, 2012 at 5:47 PM

This exception can only occure (and is not being caught on the library level) in the message body parsing, when you call the GetDecodedBody method. So without having the exact body content for the message, i can't fix it.

Sep 14, 2012 at 5:18 AM
Edited Sep 14, 2012 at 5:28 AM

sorry i m getting error from follwoing line

 

 

 

ImapX.MessageCollection emails = client.Folders["INBOX"].Search(query, true);

 

 

 

Coordinator
Sep 14, 2012 at 8:07 AM
Edited Sep 14, 2012 at 9:22 AM

If you report any exceptions, please always provide a detailed stacktrace. A line of YOUR code doesn't say anything out about what happens inside the library. I'm sorry, but I'm not a fortune-teller.

I'll go through the code to see what happens, but to really fix it, I need at least a stacktrace.

If you can also provide a test message on which the exception occurs, it would be perfect.

You can use the smaple application to get the stacktrace. It's provided on all unhandled exceptions

Sep 14, 2012 at 10:04 AM
Edited Sep 14, 2012 at 11:31 AM

chk follwoing SS

Sep 14, 2012 at 10:34 AM
Edited Sep 14, 2012 at 10:35 AM

http://i1187.photobucket.com/albums/z393/shyamk128/Untitled.png

plz chk img and solve it plz

Coordinator
Sep 14, 2012 at 10:54 AM
Edited Sep 14, 2012 at 10:58 AM

The error occurs when trying to parse an attachment. Could you send me the attachement included into your message to p13a92@googlemail.com or tell me more about it?

Also: the code that is responsible for the attachment parsing was updated yesterday, make sure you have the latest version of the library

Sep 14, 2012 at 11:18 AM
Edited Sep 14, 2012 at 11:29 AM

ok but that screenshot taken just few min ago. and also downloaded u r latest sample app few min ago . but getting same err and u r seen that error screen shot

 

 

 

_______________

and that email contains lot of emails . how we come to know in whic email we get error? any idea?

Coordinator
Sep 14, 2012 at 11:59 AM

I updated the sample application (binaries) to provide more details on this error. Now, you'll get an error dialog with all required details. Please copy the exception details provided in this dialog to a text file, and send it to p13a92@googlemail.com.

 

Sep 14, 2012 at 12:08 PM

ok thanks will chk n reply

May 1, 2013 at 4:38 PM
I have the same issue. It happens if I have excel attachment (not all cases). I've downloaded latest version ImapX (2.0.0.9) but still I get error message.

Here is my code:
            _messages = folder.Messages.ToList(); 

            foreach (var message in _messages)
            {
                message.Process();  //I get error on this line if there Excel file attachment (as I mentioned before it happens just in some cases)
                MailMessage mailMessage = PopulateMailMessage(message);
                if (mailMessage != null)
                {
                    mailMessage = CheckIfNeedsToReportError(mailMessage);
                    SendMail(mailMessage);                        
                }
            }
Coordinator
May 1, 2013 at 11:37 PM
Edited May 1, 2013 at 11:41 PM
Hi sirous70,

I updated the source code in the repository today, the latest changes contain many fixes for attachment parsing. Can you check if you still experience the issue using the source code from the repository?

If so, would ask you to provide some test credentials, so I can debug the code and see when the error occurs. You can send them directly to me: p13a92@googlemail.com .



Best regards,

Pavel Azanov
Coordinator
May 2, 2013 at 10:40 AM
sirous70, please do not send duplicate posts. The answer is above this message.