Search The ForumSearch   RegisterRegister  LoginLogin

MailBee IMAP4

 AfterLogic Forum : MailBee IMAP4
Subject Topic: Large Attachements Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
CRT
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 09 December 2005 at 8:59pm | IP Logged Quote CRT

When getting the body with a large attachement, the ASP session times out. Is there any way to get the HTML formatted body without the .GetBodyWithEmbeddedObjectsEx method hanging up due to the sheer size of the attachment(s). Maybe using the Censor object?

Thanks in advance?

Chuck
Back to Top View CRT's Profile Search for other posts by CRT
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 10 December 2005 at 11:23am | IP Logged Quote Alex

Since .GetBodyWithEmbeddedObjectsEx method saves all embedded images to disk, it's possible ASP timeout occurs because saving a large file takes a lot of time (this may be caused by an antivirus program monitoring all disk writes). In this case, the timeout will also occur when saving all attachments using the code like below:
Code:

For Each Attach In Msg.Attachments
    Attach.SaveFile msgFolder
Next

Important: msgFolder must point to the same folder where .GetBodyWithEmbeddedObjectsEx saves files.

If the code above times out, this means disk writes are very slow (antivirus or whatever), and you should either increase Server.ScriptTimeout or do not save embedded images to disk at all and just use .BodyText property instead of .GetBodyWithEmbeddedObjectsEx method to get the body contents.

If, however, saving all attachments with .SaveFile method called for each attachment does not time out (while GetBodyWithEmbeddedObjectsEx does), could you please provide us with the mail message which causes the timeout (such as test account on your mail server which contains this mail) along with the code you're using?
You can send us this info using Support Form. Thanks!

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
CRT
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 10 December 2005 at 5:22pm | IP Logged Quote CRT

Thanks for the quick response. Did a little more digging and it looks like the code is timing out on the following statement
--Set Message = Mailer.RetrieveSingleMessage(sID, True);
Let me know if you still need the test account. I will look into it in the meantime.

Regards,
Chuck
Back to Top View CRT's Profile Search for other posts by CRT
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 11 December 2005 at 9:54am | IP Logged Quote Alex

Perhaps, you should increase network timeout value as well:
Code:

Set Mailer = CreateObject("MailBee.IMAP4")
Mailer.Timeout = 300
Server.ScriptTimeout = 300


The above will increase the timeout from 30 seconds (default) to 300 seconds. I also increased ASP timeout to keep ASP engine from timing out while the large mail is being received.

- If this helps, it means the connection with the mail server (or mail server itself) is very slow. You should either change the mail server or consult the mail server manufacturer on resolving this issue.

- If this does not help, please enable MailBee logging:
Code:

Set Mailer = CreateObject("MailBee.IMAP4")
Mailer.LogFilePath = "C:\log.txt"
Mailer.EnableLogging = True
...


then execute your code again and post the log here. It might shed some light on the problem.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide