Error retrieving PlainText from a mail - WeOnlyDo Discussion board

Error retrieving PlainText from a mail (General questions)

by GLlort, Monday, May 16, 2005, 14:15 (7130 days ago)

Hello,

I'm trying the wodMilBox component for an application that need to read EML messages from Exchange server.

I have de EML message and I can open and read the message width wodMailBox component. I get correctly his attachments and data (from, to, date, etc...) but when I trying to read the PlainText property, an error occurs. The message is:

80004005 - Automation Error

I'm developing this app using VB6 SP6 (Spanish language) under WIndows XP Pro.

Thank's and regards from Barcelona (Spain)

Gerard

Re: Error retrieving PlainText from a mail

by wodSupport, Monday, May 16, 2005, 19:07 (7130 days ago) @ GLlort

Gerard,

80004005 doesn't look like our error, it could be something else involved here. Any chance you could send me exact code you use, and possible that email message that causes trouble, to techsupport@weonlydo.com so we could check it out and give better answer?

Re: Error retrieving PlainText from a mail

by GLlort, Monday, May 16, 2005, 20:56 (7130 days ago) @ wodSupport

The code like this:

Set oMail = CreateObject( WeOnlyDo.wodMailboxCom )
oMail.FileName = sFile
oMail.Lock

If oMail.Messages.Count > 0 Then

tMessage.FromName = oMail.Messages(0).FromName
tMessage.FromAddress = oMail.Messages(0).FromEmail
tMessage.ToName = oMail.Messages(0).ToName
tMessage.ToAddress = oMail.Messages(0).ToEmail
tMessage.DateRecv = Format$(oMail.Messages(0).Date, dd/MM/yyyy hh:mm:ss )
tMessage.Subject = oMail.Messages(0).Subject
If oMail.Messages(0).Parts.Count > 1 Then
For iCont = 0 To oMail.Messages(0).Parts.Count - 1
tMessage.Body = tMessage.Body & oMail.Messages(0).Parts(iCont).PlainText
Next
Else
tMessage.Body = oMail.Messages(0).HTMLText
End If

End If
oMail.Unlock
Set oMail = Nothing

...but when I call Lock method, PlainText property appears in the watch window with the mentioned automation error...(??). I think that is

Re: Error retrieving PlainText from a mail

by wodSupport, Monday, May 16, 2005, 23:11 (7129 days ago) @ GLlort

Gerard,

I have to kindly ask you once again to send that code to our email techsupport@weonlydo.com. As you have noticed, forum posts don't really keep it nice :) and besides, it doesn't help if we don't have original email message that you are trying to open with your code. So, I would appreciate if you could send that code AND the message that causes trouble to our email, please.

Thanks!

Re: Error retrieving PlainText from a mail

by GLlort, Thursday, May 19, 2005, 09:30 (7127 days ago) @ wodSupport

Thanks for all!

Now I can read PlainText property!

Gerard