Security ActiveX
Crypt
SSH
SFTP
SSHServer
SSHTunnel
SSHpackage
SFTPdll

Security .NET
SSH.NET
SFTP.NET
FtpDLX.NET
WebServer.NET

General Protocols
AppUpdate
HttpDLX
FtpDLX
TelnetDLX
FTPServer
WebServer
VPN
XMPP

Mail
MailServer
Mailbox
ImapServer
SmtpServer
Pop3Server
Smtp
Pop3

Free
Beep
DHCPServer
ShellMenu

  Search: 
Anonymous posting is allowed. We will try to reply to your posts as soon as possible. Another members are encouraged to reply to new users.
If you specify your email in the posted message, it will be masked. You will receive notification when someone replies to your post.
NOTE: we are slowly moving interesting forum posts to our Knowledge base so if you see posts deleted - you know where to find them.
Remember me Registration (Optional)
Forums -> ->
Reply | New topic

bkv

Postings: 25
New member
          
Pls help with wodImapServer 16-12-2009 14:41
Hello,
We are trying to use wodImapServer and a bit confused with a logic of
ReadMessage and ListMessages methods. In your examples you didn`t use ReadMessage at all.

As I understand, ImapServer has to be able to send to user information about messages with certain detail level. Whole messages or only headers.
So, that when user connects, first he has to retrieve the list of messages headers for folder. Than, when navigate to certain message, retrieve whole message with body.
But we are not able to understand how to implement that logic using
ReadMessage and ListMessages. When and how to load only headers and when whole message.

Thanks in advanced,
Konstantin




Reply with quote

woddrazen
WeOnlyDo! Technical support

Postings: 1352
Moderator
          
Re: Pls help with wodImapServer 16-12-2009 16:01
Hi Konstantin,


I suppose you are using 2. Full VB6 sample.

Inside that sample full messages are loaded in ListMessages Event using msg.FileName Property.

So there is no need to load separately message header because full message is loaded already including message header.

When client request headers for listing messages wodImapServer pass that part.

When full message body is required wodImapServer send full message body to client.

Hope I helped.


Regards,
Drazen

____________________________________
WeOnlyDo! Software - Internet Security Components
-----=== http://www.weonlydo.com ===-----

Reply with quote

bkv

Postings: 25
New member
          
Re: Pls help with wodImapServer 16-12-2009 22:06
Hello,
Thank you for quick response.

So, the first approach is to load whole messages in ListMessages.
But in our case that is not efficient. Messages in our system are saved not in eml files, but in different tables and to create a whole eml representation of message we have to do a lot of workaround, which is time and resources consuming.
It is much more quicker to load only headers first (it is very easy in our case), and load only message body when it is really necessary.
How it could be implemented?
In ListMessages load only headers and in ReadMessage whole eml? Or what?

Reply with quote

wodDamir
Support

Postings: 1322
Moderator
          
Re: Pls help with wodImapServer 16-12-2009 22:31
Konstantin,

Yes, that's correct. When ReadMesage event is triggered, then the message Body is requested. This means that you should load the actual message body at this time if you haven't done so yet.

As for ListMessages, it fires when message list is requested. This is where you can populate headers.

Hope this helps.

Reagards,
Damba

____________________________________
____________________________________
WeOnlyDo! Software - Internet Security Components
-----=== http://www.weonlydo.com ===-----

Reply with quote

bkv

Postings: 25
New member
          
Re: Pls help with wodImapServer 17-12-2009 10:21
Hello,

Than several more questions:
1) So in ListMessage event we have to load only headers.
How to load only header in ImapMessage object? ImapMessage.Headers is a readonly. We have a subject, to, from addresses and so on as strings.
2) In ReadMessage we have to load message body. How to detect that message body is not loaded? And what is a right way to load only message body if headers are loaded? Thanks
Reply with quote

wodDamir
Support

Postings: 1322
Moderator
          
Re: Pls help with wodImapServer 17-12-2009 12:30
Konstantin,

Let me try answering:

1) You simply fill in the Body property with Headers only
2) You can check if Text property contains anything, or thru Parts collection (for multi-part messages). Then you can simply append the message text to already populated (with headers) Body property.

Hope this helps.

Regards,
Damba

____________________________________
____________________________________
WeOnlyDo! Software - Internet Security Components
-----=== http://www.weonlydo.com ===-----

Reply with quote

bkv

Postings: 25
New member
          
Re: Pls help with wodImapServer 17-12-2009 14:14
Hello,

Thanks, seems it is clear now.
I will revert with some questions after testing. :)

Thanks, Konstantin
Reply with quote
 
 
Copyright © 2001-2013 WeOnlyDo All Rights Reserved
Privacy statement     |     Terms of use     |     Refund policy