Click or drag to resize

CStorage Class

X#
Provide an interface to handle large Email Messages and attachments
Inheritance Hierarchy
Object
  CStorage

Namespace:  VO
Assembly:  VOInternetClasses (in VOInternetClasses.dll) Version: 2.19
Syntax
 CLASS CStorage
Request Example View Source

The CStorage type exposes the following members.

Constructors
  NameDescription
Public methodCStorage
Enter topic text here.
Top
Properties
  NameDescription
Public propertyAttachmentSize
Returns the file size of a currently stored or an opened attachment file. This access is called during receiving an email.
Public propertyNoSave
You can use this assign to suppress the storing of the attachments into the storage. This makes sense, if you want to store only raw email files.
Top
Methods
  NameDescription
Public methodAttachmentAdd
This method is called when an email is received to initialize the saving of a new attachment. The implementation in CStorage generates a unique ID and creates the (empty) file.
Public methodAttachmentClose
This method is called after receiving of an attachment or after reading of an attachment from the storage during sending. The implementation in CStorage closes an open file.
Public methodAttachmentDelete
This method returns the full path of an attachment file addressed through cAttachID.
Public methodAttachmentFullPath
This method returns the full path of an attachment file addressed through cAttachID.
Public methodAttachmentOpen
This method is called during sending of an email, if an attachment have to be sent. It prepares the loading process from the storage. In our case it addresses the attachment file and opens it.
Public methodAttachmentRead
This method is called during sending of an attachment. It reads a data block from the attachment file. In our implementation it reads 1536 bytes. The result string is the encoded value of this data block.
Public methodAttachmentSave
Stores the attachment with the ID cAttachID to the file cToFile. cToFile must be a full path name. This method is called from CEMail:SaveAs().
Public methodAttachmentWrite
This method is called multiple times per attachment during the receive process.
Public methodCreateNewEMail
**Missing documentation **
Public methodLoadEMail
This method returns a CEMail object filled with all data addressed through the cID. You have to implement this method and the meaning of cID. THIS METHOD IS NOT IMPLEMENTED IN CSTORAGE AND NOT CALLED BY THE INTERNET CLASSES
Public methodRawClose
This method is called when an email was received completely.
Public methodRawNew
This method is called at the beginning before any data is received. You have to implement how you want to store and address the raw data here.
Public methodRawWrite
Now this method is called multiple times until the complete email including all attachments is received. You have to implement how you want to store each data block.
Public methodSaveAttachments
This method stores all attachments of an email into the storage.
Public methodSaveEMail
This method stores a CEMail object including all data under the address of the cID. You have to implement this method and the meaning of cID. THIS METHOD IS NOT IMPLEMENTED IN CSTORAGE AND NOT CALLED BY THE INTERNET CLASSES
Top
Remarks
This class is used Exclusively by the CEMail Class to read and write attachments. The class reads/writes attachments in a disk folder. If you want to store attachments on another location (for example a SQL Database) then you should subclass this class and override the implementation of the methods. CStorage also gives you an interface to store the raw data of received emails. During reception of an email the following three methods are called: RawNew() RawWrite() RawClose() You can use these methods to implement your own mechanism to save the raw email contents. This class provides an interface that is used to handle streaming of inbound and outbound messages
See Also

Reference