Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET POP3

 AfterLogic Forum : MailBee.NET POP3
Subject Topic: same attachments saved multiple times Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
caussin
Newbie
Newbie


Joined: 06 January 2009
Location: France
Online Status: Offline
Posts: 6
Posted: 28 January 2009 at 8:41am | IP Logged Quote caussin

Hello,
i am working on a web application that displays html emails, using GetHtmlAndSaveRelatedFiles combined with .Parser.WorkingFolder to extract the attachments into a working folder, then into a sub folder made with a MD5 name.

Every thing works fine. The main call is :
Dim ReworkedHTMLBody As String = Msg.GetHtmlAndSaveRelatedFiles("WBGetEmailPart.ashx?", VirtualMappingType.Dynamic, MessageFolderBehavior.CreateOnly)

i use the CreateOnly option because it is a web application and these files need to be accessed even when the ASP.NET call is finished... as you adviced.

The only problem is that each subsequent call to the code for the same email (if the user refreshes the page for example) writes again and again the attachment files (with [1]... [2]... extensions).

is there a way to avoid that ? Knowing that each email is using a specific folder (whose name is made with MD5), what's the point writing the same attachment again and again, and not re-use the initial file ?

Thanks for your answer.

Olivier

Back to Top View caussin's Profile Search for other posts by caussin
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 29 January 2009 at 5:38am | IP Logged Quote Andrew

The point of not re-using the initial file is that multiple different messages can be saved into the same folder and if they have attachments with equal names, they'll overwrite each other. You may implement deleting all files in the appropriate folder prior to GetHtmlAndSaveRelatedFiles call.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 

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