Quantcast
Channel: ImapX 2
Viewing all 1952 articles
Browse latest View live

New Post: Save EML

$
0
0
Hi bresolin,

before callng the Message.ToEml method, please consider downloading the message completely:
message.Download(MessageFetchMode.Full, true);
var eml = message.ToEml();
however, a better way is:
var eml = message.DownloadRawMessage();
Best regards,

Pavel

New Post: ProcessHeader() Method is not working after few folders iteration

$
0
0
Hi,
I use IMAPX 2.0.0.9, and my tool downloads emails from yahoo, gmail and hotmail, in my scenario I get list of all emails of each folder and then process header with ProcessHeader(), if I already have messageId in my database i don't download it otherwise I download that message, the issue is after iteration on first few folders (2-3 folders) ProcessHeader() doesn't give me header details and all is 0 or null, here is my code:
messages = client.Folders[folder.Name].Search("ALL", false);
messages = messages.OrderByDescending(m => m.MessageUid).ToList();
                if (messages.Count > 0)
                {
                    foreach (ImapX.Message message in messages)
                    {
                            message.ProcessHeader();
                            if (message.MessageId != null && !mailRepo.MessageExist(new MailMessage() { MessageId = message.MessageId }))

                            {
                                message.Process();
                                 //Download it
                             }
                        }
                   }

Created Unassigned: SMime [1903]

$
0
0
Hello Pavel,
I'm using your library for a small e-mail client.
I wanted to make to you my compliments and alert you that but maybe there is a problem with the signed email messages (SMIME).
It would seem that your library is not able to parse a message of "Certified Mail" essentially messages with the following

Content-Type: __multipart / signed__;
protocol = __"application/x-pkcs7-signature"__;
micalg = __sha1__;
boundary = "---- 74CF8802A5ECD9D94B825A2E2F01916E"

It's possible?

I gave a look at your code and I have not seen anything about the verification of signed messages.

Thanks in advance for your attention...

Giorgio

New Post: ProcessHeader() Method is not working after few folders iteration

$
0
0
Hi ehsan63,

do you have to use the version 2.0.0.9 for any specific reason? How about upgrading your code to the latest version? It provides extended features on limiting the amount of data to be downloaded, which definitly will make your application faster. I can also provide help upgrading your code.

Best regards,

Pavel

Commented Unassigned: SMime [1903]

$
0
0
Hello Pavel,
I'm using your library for a small e-mail client.
I wanted to make to you my compliments and alert you that but maybe there is a problem with the signed email messages (SMIME).
It would seem that your library is not able to parse a message of "Certified Mail" essentially messages with the following

Content-Type: __multipart / signed__;
protocol = __"application/x-pkcs7-signature"__;
micalg = __sha1__;
boundary = "---- 74CF8802A5ECD9D94B825A2E2F01916E"

It's possible?

I gave a look at your code and I have not seen anything about the verification of signed messages.

Thanks in advance for your attention...

Giorgio
Comments: ** Comment from web user: pavel_azanov **

Hi Giorgio,

you're right, currently there's no support for signed messages, however it is on the list of features to be implemented and i'm in process of studying various papers on this topic. Another point is that soon ImapX will have a new mime parser (MimeKit), so adding support for signed messages will be connected with less problems.

Greets,

Pavel

New Post: ProcessHeader() Method is not working after few folders iteration

$
0
0
Hi Pavel,
I have to use this version at the moment as my whole application works under this version, do you have any idea what's wrong with this weird issue?
Thanks

New Post: message.Attachments sometimes is wrong

$
0
0
Hi Pavel,

Any news about new release ?
The issue starts to be a problem for me....... At the moment, even a patch would be great :)

Greets,
Francesco

New Post: Body.Html error

$
0
0
Hi, by using the same method Body.Html are removing the spaces of the message, precluding its use, so does Body.Text

New Post: Examine query

$
0
0
Hi Pavel,

Many thanks for your reply and for your ongoing work on the STATUS command. How do I access the results of the work you have done so far on this?

Regards, JanEric

New Post: message.Seen = true isn't working properly

$
0
0
Noivern, have you tried this yet? I downloaded the latest source and I still have to check the emails twice to get them as seen.

New Post: Cannot save Attachements

$
0
0
Hey Pavel,

Thanks for the great library.

I'm also getting this error my code is :
foreach (var attachment in currentMessage.Attachments)
{
    attachment.Download();
    attachmentName = attachment.FileName;
    if (!Directory.Exists(fullPath))
        Directory.CreateDirectory(fullPath);
    attachment.Save(fullPath);                               
}
Looking at the attachment properties I also see that FileData and FileSize throw an exception of type 'System.FormatException' byte[] {System.FormatException}
with base {"The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. "} System.SystemException {System.FormatException}

The attachment I'm trying to save is a small png file I'm just using to test whether or not saving attachments work.

New Post: Announcement: ImapX 2.0.0.16

$
0
0
Good day everyone!

First of all I want to apologize for the delayed responses to your questions, the last few weeks been quite busy.

Nevertheless the work on the ImapX library goes on, and there are two news to tell.

ImapX 2.0.0.16 release

The release of ImapX 2.0.0.16 is now set to 5th March, which is mid of next week. The update will contain the following fixes and features:
  • Fixed bodystructure parser, which is dealing well with complex letters
  • Fixed message part download, avoiding any junk characters in the body, which caused decoding errors.
  • Support for time zones in dates
  • Support for GZIP and DEFLATE compression (COMPRESS command)
  • Support for the STATUS command (* already available in latest source code in repository)
The list is not complete yet, I will update it in the next days.

Official website and extended support

Around two weeks ago ImapX got an official website: http://imapx.org. In future it will be the central source for the documentation and sample code.

I'm also working on an offer for users who need extended support and often fast reaction to issues (e.g within 24-48h). Most likely a commercial plan will be provided for them. The library itself stays free and open source.

Best regards,

Pavel Azanov

New Post: Announcement: ImapX 2.0.0.16

$
0
0
Yeah, finding the specifications is quite a trouble. For the RFCs connected with IMAP, I found a good list on the German Wikipedia site. However, I didn't see any website providing a whole list of specifications on IMAP and all available extensions. (Maybe should think about creating one?)

New Post: Walking thrue lot of e-mails in folder

$
0
0
Hi Miroslav,

ImapX offers various downloas modes for messages, which makes it easier to limit the amount of the data to be downloaded.

To provide you with a solution which on the one hand does all you need, and on the other hand offers good performance, I need to know exactly what you plan to do with the messages within the for..each in your code.

Greets,

Pavel

New Post: Remove label Gmail

$
0
0
thanks Pavel, I'll check
good job
Greetings from Santiago, Chile

Horacio

New Post: Walking thrue lot of e-mails in folder

$
0
0
Hi Pavel,

I only need to read all messages in Inbox and Sent in loop and save them as EML in local folders.

Thank you very much for your help

Miroslav

New Post: Cannot save Attachements

$
0
0
Hi,

Just to let you know: I had the same problem today. I couldn't retrieve the attachements. Here's what I did:

In Base64.cs on line 92 I added:
s = s.Replace("* 1 FETCH (", string.Empty);

int outlookInt = s.IndexOf("UID");
if (outlookInt > 5)
{
    s = s.Substring(0, outlookInt);
}
The problem is: there was a ( added to the first part: (JVBERi0x. And at the end was the text: UID 75. So that results in a bad base64 string.

The fix is very ugly, but for a friday, it works.

SIncerely,

Johannes

New Post: Walking thrue lot of e-mails in folder

$
0
0
Hi Miroslav,

in this case you can use the following approach:
' First of all, we change the global download mode of the client to write less code later
' Setting the fetch mode to None will only request the message UIds, and nothing else
imapClient.Behavior.MessageFetchMode = MessageFetchMode.None

' Next, we  perform a download, fetching only the UIds
imapClient.Inbox.Messages.Download()

'Now we can loop through the messages in the folder and request the EML data for each of them:
For Each msg In imapClient.Folders.Inbox.Messages
      
      Dim eml = msg.DownloadRawMessage()

Next
This solution should work faster than the one you are using.

The method DownloadRawMessage is now only available in the latest code in the repository. If you don't want to compile it yourself, just let me know which .Net version you're using, I'll compile the library for you.

New Post: Walking thrue lot of e-mails in folder

$
0
0
Hi Pavel,

thank you for your quick response!

I am using VB.NET 4.5.

Sincerely Miroslav

Created Unassigned: Opening closing bracket () logic to NormalizeAndProcessFetchResultseems incorrect [1907]

$
0
0
In Message.NormalizeAndProcessFetchResult the list has all headers, The subject header is divided into two items

1. This is my subject with opening ( bracket in it
2. closing bracket) is here

While parsing the 1 item, the code line
if ((str.Split('(').Length - (i == 0 ? 1 : 0)) >= (str.Split(')').Length))
return true, hence ProcessCommandResult(str); is executed.

But when parsing item 2, the if statement returns false and the remaining subject is added to buffer which later is append to from header and then other header, hence no headers after subject are actually parsed.


You may want to change it to
if ((str.Split(')').Length + (i == 0 ? 1 : 0)) >= (str.Split('(').Length))

but this will have same issue in case subject only has a opening ( bracket

Hence I have changed it to
if ((str.Split(')').Length + (i == 0 ? 1 : 0)) >= (str.Split('(').Length) || (i + 1 < data.Count && Regex.IsMatch(data[i+1], @"^[A-Za-z-]+:")))
Viewing all 1952 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>