Looping through mailbox file - WeOnlyDo Discussion board

Looping through mailbox file (wodWebServer / wodWebServer.NET)

by Joey, Monday, March 16, 2009, 03:32 (5730 days ago)

I'm trying to insert a header into about 2300 messages. This is a Thunderbird folder. VB keeps crashing, Outlook also. Is it my code or limitations of WodMailbox?
[code]Sub InsertMessageIdHeader()

Dim oMailbox As wodMailboxCom
Set oMailbox = New wodMailboxCom
oMailbox.FileName = C:TestSent
oMailbox.Lock

For Each oMessage In oMailbox.Messages
If oMessage.Headers.Exists( Date ) And _
Not oMessage.Headers.Exists( Message-Id ) Then
oMessage.Headers.Add Message-Id , oMessage.Headers( Date )
End If
Next oMessage
oMailbox.Update
oMailbox.Unlock

End Sub[/code]

Re: Looping through mailbox file

by Joey, Monday, March 16, 2009, 03:36 (5730 days ago) @ Joey

I'm trying to insert a header into about 2300 messages. This is a Thunderbird folder. VB keeps crashing, Outlook also. Is it my code or limitations of WodMailbox?
[code]Sub InsertMessageIdHeader()

Dim oMailbox As wodMailboxCom
Set oMailbox = New wodMailboxCom
oMailbox.FileName = C:TestSent
oMailbox.Lock

For Each oMessage In oMailbox.Messages
If oMessage.Headers.Exists( Date ) And _
Not oMessage.Headers.Exists( Message-Id ) Then
oMessage.Headers.Add Message-Id , oMessage.Headers( Date )
End If
Next oMessage
oMailbox.Update
oMailbox.Unlock

End Sub[/code]

Apparently the code tag strips out backslashes. That was C:TestSent , Sent being the file I'm attempting to alter.

Re: Looping through mailbox file

by wodDamir, Monday, March 16, 2009, 08:56 (5729 days ago) @ Joey

Hi Joey,

Can you do the same on some folder that has less messages, just for test?

I tried doing the same on my side using our 1. Simple sample, any it worked like a charm. I just added the code to add Header (your code). Can you try doing the same?

Also, what version of the component are you using?

Regards,
Damba

Re: Looping through mailbox file

by Joey, Monday, March 16, 2009, 18:31 (5729 days ago) @ wodDamir

Hi Joey,

Can you do the same on some folder that has less messages, just for test?

I tried doing the same on my side using our 1. Simple sample, any it worked like a charm. I just added the code to add Header (your code). Can you try doing the same?

Also, what version of the component are you using?

Regards,
Damba

I tried it with 115 messages and it worked fine. I thought that the insert value might be wrong since it is of datatype Iheader so I changed the code slightly:

oMessage.Headers.Add Message-Id , CStr(oMessage.Headers( Date ))

That did not make a difference - VB still crashes. Here is the error message:

Faulting application vb6.exe, version 6.0.97.82, faulting module wodmailbox.dll, version 2.1.3.67, fault address 0x000127ce.

Re: Looping through mailbox file

by woddrazen, Monday, March 16, 2009, 18:49 (5729 days ago) @ Joey

Hi Joey,


Can you please check what does wodMailBox Version Property returns?


Regards,
Drazen

Re: Looping through mailbox file

by Joey, Monday, March 16, 2009, 18:54 (5729 days ago) @ woddrazen

Hi Joey,


Can you please check what does wodMailBox Version Property returns?


Regards,
Drazen

2.1.3.67

Re: Looping through mailbox file

by woddrazen, Monday, March 16, 2009, 19:04 (5729 days ago) @ Joey

Joey,


Can you please try it out with latest 2.1.5.72 version.

in order to get update for our product, please go to:

http://www.weonlydo.com/index.asp?update=1

This is automated process. Make sure you use same email address that is registered with our system, one you used when you have purchased the product.

If problem persist is there any chance you can send us some simple sample that will duplicate your problem including your mailbox?

You can send sample to techsupport@weonlydo.com


Drazen

Re: Looping through mailbox file

by Joey, Monday, March 16, 2009, 19:31 (5729 days ago) @ woddrazen

Joey,


Can you please try it out with latest 2.1.5.72 version.

in order to get update for our product, please go to:

http://www.weonlydo.com/index.asp?update=1

This is automated process. Make sure you use same email address that is registered with our system, one you used when you have purchased the product.

If problem persist is there any chance you can send us some simple sample that will duplicate your problem including your mailbox?

You can send sample to techsupport@weonlydo.com


Drazen

My version is not eligible for that upgrade. Plus I can't send you sample as it contains actual e-mails which I can't share. But to test, you would have to have a mailbox file, preferably sent messages, with 2300 messages.

Re: Looping through mailbox file

by woddrazen, Monday, March 16, 2009, 22:21 (5729 days ago) @ Joey

Joey,


I preform test with 2500 emails and I didn't receive any error or crash during adding header in each email

This is only line I change in your code
[code]oMessage.Headers.Add Message-Id , oMessage.Headers( Date ).Value[/code]
Can you please test with latest DEMO version from our website? Please backup somewhere your old licensed version.

If problem persist can you maybe send us some test message (saved in file and send as attachment) to techsupport@weonlydo.com ?


Drazen