wodSmtpServer ActiveX Control - Filename Property
      
 

Description

Determines filename where message is stored.


Property type

A String value.  


Syntax

object.Filename [= value]



The Filename Property syntax has these parts:

Part Description
object An expression evaluating to an object of type SmtpMessage.
value A String value.

Remarks

Smtp server and message objects store all information in files on disk. If you specify Filename property for the message, Smtp server will store new email to that specific file so you can access it later on. If you don't specify filename, temporary file will be generated and message will be stored there. In that case, you should determine what to do with new message in MailReceived event, because after that temporary file will be deleted.

However, if it's easier for you, you can access raw message contents using Body property (also you can do this if you want to change message prior to saving to new file). If you do so, Smtp  server will create new temporary file that will be valid as long as message object exists, and will write to it. You don't have to manually delete such file because Smtp server will do that for you.

If your message is not the only one in a given Filename, in other words if file is a mailbox, you should specify FileAppend = True so that new message is appended to mailbox. If you don't specify that, mailbox (file with mail) will be truncated and overwritten with new message.