Class PstImporter
Imports messages, contacts, and appointments from files on disk (MSG, EML, VCF, ICS) into a PST folder.
Inherited Members
Namespace: DRIT.Mail.Conversion
Assembly: DRIT.Mail.dll
Syntax
public static class PstImporter
Methods
View SourceImportEmlFiles(CompositeFolder, string, bool)
Imports all EML files from a directory into the specified PST folder.
Declaration
public static int ImportEmlFiles(CompositeFolder targetFolder, string inputDirectory, bool recursive = true)
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeFolder | targetFolder | The PST folder to import into. |
| string | inputDirectory | The directory to scan for EML files. |
| bool | recursive |
|
Returns
| Type | Description |
|---|---|
| int | The number of messages successfully imported. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |
ImportIcsFiles(CompositeFolder, string)
Imports all ICS (iCalendar) files from a directory into the specified PST folder as appointments.
Declaration
public static int ImportIcsFiles(CompositeFolder targetFolder, string inputDirectory)
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeFolder | targetFolder | The PST folder to import into. |
| string | inputDirectory | The directory to scan for ICS files. |
Returns
| Type | Description |
|---|---|
| int | The number of appointments successfully imported. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |
ImportMsgFiles(CompositeFolder, string, bool)
Imports all MSG files from a directory into the specified PST folder.
Declaration
public static int ImportMsgFiles(CompositeFolder targetFolder, string inputDirectory, bool recursive = true)
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeFolder | targetFolder | The PST folder to import into. |
| string | inputDirectory | The directory to scan for MSG files. |
| bool | recursive |
|
Returns
| Type | Description |
|---|---|
| int | The number of messages successfully imported. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |
ImportVcfFiles(CompositeFolder, string)
Imports all VCF (vCard) files from a directory into the specified PST folder as contacts.
Declaration
public static int ImportVcfFiles(CompositeFolder targetFolder, string inputDirectory)
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeFolder | targetFolder | The PST folder to import into. |
| string | inputDirectory | The directory to scan for VCF files. |
Returns
| Type | Description |
|---|---|
| int | The number of contacts successfully imported. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |