Automating Import from an Email Server with Email Archive
Email Archive allows you to automatically archive emails to a Laserfiche repository. Emails can be archived to multiple locations based on various conditions. Additionally, Email Archive can assign metadata to the messages and save email attachments.
Example: An organization needs to keep all incoming client messages. Client messages are all routed to a shared mailbox on their mail server and from there Email Archive sends them to a Laserfiche repository without requiring any action on the user's part. Based on the conditions set in the Email Archive profiles, the emails are saved to a Correspondences folder inside each client's folder. Additionally, metadata is applied each message, allowing them to be easily searched in the future.
How Does Email Archive Work?
Email Archive profiles use IMAP to periodically poll a monitored email folder for emails to send messages to Laserfiche. Your email server's settings can be used to determine which emails are moved to the monitored folder. Emails from that folder are then saved as EML electronic documents in a Laserfiche repository based on an import profile.
After mail is archived to Laserfiche, you can create a workflow that will route and organize messages in the correct folders.
Creating a Profile to Automatically Import Emails
Email Archive profiles define the rules that determine which emails will be imported to Laserfiche, where they will be saved, and the metadata that will be applied to them.
- Open Laserfiche Email Archive Configuration from the Windows Start Menu.
- Select Profile from the menu, and then select Add profile.
- Enter your Laserfiche repository and authentication information. Select the Cloud tab to log into Laserfiche. and provide a user (not built -in system) account ID, username, and password. We recommend using a Service Principal user, which is a secure, unlicensed user that Laserfiche provides for connecting applications.
- On the General tab, name your profile.
- Select IMAP to periodically poll a monitored email folder for emails to send to email archive. The SMTP option is being deprecated and is not recommended.
- If you select Disable this profile , you can save your profile but it will not be operational.
- Under Mail server, for Authentication Type, select either Basic Authentication or Microsoft 365 OAuth 2.0.
- If you selected Basic Authentication, configure the following:
- Server: Your mail server's URL. For Gmail, this is imap.gmail.com.
- Port: The standard IMAP server ports are 143 (non-encrypted) and 993 (SSL).
- Use SSL: Select this option to use a SSL connection to the server.
- Username: The username of the account associated with the mailbox Email Archive will monitor.
- Password: If you selected BasicAuth, enter the password for the account.
- Shared mailbox alias: If you want Email Archive to monitor a shared mailbox, instead of the mailbox associated with a single account, enter the mailbox's name here.
- If you selected Microsoft 365 OAuth 2.0, configure the following:
- Username: The username of the account associated with the mailbox Email Archive will monitor.
- Application (client) ID: This is the application ID assigned to your app. The ID can be found in the portal where the app was registered.
- Client secret: The client secret generated for the app in the app registration portal.
- Tenant ID: The directory tenant that granted the app the permissions requested, in GUID format. The ID can be found in the portal where the app was registered.
- Test Connection: Click this button to ensure Email Archive can connect to your Exchange server using the credentials you provided.
- Under Message retrieval, enter the following:
- Polling interval in minutes: Specify how frequently Email Archive will poll the monitored folder for emails to archive.
- Retrieve unread messages and set their status to read: Select this option if you want Email Archive to change the status of messages it's processed to "read." You will still need to either delete or move processed emails (configured under Post-processing) regardless of whether messages are set to read or not.
- Under Post-processing, enter the following:
- Monitored folder: Enter the path of the email folder you want Email Archive to monitor and retrieve emails from. (E.g., Inbox or Inbox\Contracts). Subfolders in the folder you specify here will also be monitored and their contents archived. By default, messages in subfolders of the monitored folder will be archived as well, but you can select Exclude subfolders to skip messages in subfolders.
- Permanently delete messages once they are archived: Select this option to delete emails from the mail server after they've been archived to Laserfiche.
- Mail folder for messages archived to Laserfiche: If you chose not to delete archived emails, then specify a folder in your mailbox where emails will be sent after they are archived to Laserfiche. If the folder doesn't already exist, Email Archive will create it.
- Mail folder for messages that encountered an error during retrieval: Specify a folder in your mailbox where emails will be sent if they encounter an error during archival. If the folder doesn't already exist, Email Archive will create it. If an error occurs, the Windows Event Viewer on the workstation where Email Archive is installed will include the details of the error.
- Under Repository information, you can update the repository in which Email Archive will save messages.
- For SMTP configurations only: Use the Import Rules tab to specify which emails to import to Laserfiche. You can configure rules to only import emails from specific email addresses, emails that have specific email subjects, and/or emails that were sent to specific email addresses. If you do not configure any rules, then all emails sent to the recipient email address for the Email Archive service will be imported.
- Use regular expressions to detect email addresses or subjects that follow a specific pattern. Learn more.
- Use the Advanced option to configure your rules directly in the profile's XML. Learn more.
- Use the Archived Messages tab to configure the message and attachment documents archived to your repository.
- Document properties: Provide a name and location for the archived emails. You can use tokens to customize the name and file path based on the email's properties. Learn more about tokens. Additionally, select the Laserfiche volume where the emails will be archived. Learn more about volumes.
- Generate text settings: Select if you want to generate text from the email to make it searchable in the Laserfiche repository, and specify the number of lines of text on each page.
- Attachment handling: Select how attachments will be archived to Laserfiche. You can:
- Include the attachments in the message document
- Save attachments in a separate document
- Save the attachments in the message document and save them as separate documents
- Save the attachments as separate documents and discard the email message
- Optional: If you select to save attachments separately from email messages, there are several options to configure how attachments are saved.
- Attachment name: Specify how attachments will be named when they are saved to the repository. Use tokens to construct unique names. This option is only available if you choose to save attachments as separate documents.
- Save attachments with these file extensions: Specify the file extensions attachments can have for them to be archived to Laserfiche. Files with different extensions than the ones listed here will be ignored. Separate acceptable file extensions with commas. If you don't specify any file extensions here, all attachments (regardless of extension) will be saved.
- Apply the Laserfiche metadata configured in the Templates & Fields tab to attachments: Select this option to apply the fields and values configured in the Templates & Fields tab to all attachments.
- Ignore inline attachments: Select this option to ignore attachments that have been embedded in the body of an email message. Clear this option to save these attachments as separate documents.
- Generate Laserfiche pages for PDF attachments: Enable Email Archive to generate Laserfiche pages for PDF attachments as they're saved to Laserfiche. If you know the documents you are importing are color, black and white, or high-quality color, select the corresponding option from this drop-down menu. If you are importing black and white documents, selecting that option can reduce file size and save space. The legacy option uses the default PDF storage process.
- Keep original PDF files: Retain the PDF file after generating TIFF image pages. The import process will import the original unaltered PDF along with the TIFF image pages.
- Preserve PDF annotations on Laserfiche pages: Convert PDF annotations to the equivalent Laserfiche annotations when generating TIFF image pages.
- Create pages at DPI: By default, Import Agent generates TIFF images that are 300x300 DPI. Select this checkbox to configure a different DPI value.
- Error handling: Configure how the mail will be processed if there are metadata errors or if a document with the same name already exists in the repository.
Tip: To use the volume assigned to the parent folder the email will be saved in, select Use parent folder's default volume. For example, if you configured a profile to archive email to a Laserfiche folder named Contracts, and this folder had been previously configured to use a default volume named Accounting, emails imported via this profile would be stored in the Accounting volume.
- Use Template and Fields and Tag tabs to configure the templates, fields, and tags that will be applied to archived emails. Using a multi-value token in a multi-value field will append each value to the field.
- When you have finished configuring your profile, click Save.
Note: If you are using a Microsoft mail server (e.g., Exchange Online), you must select Microsoft OAuth 2.0 as your authentication type.
Note: To use Email Archive with Microsoft 365 OAuth 2.0, you must enable the API permissions “Mail.Read” and “Mail.ReadWrite” in Microsoft Azure. Learn more.
Note: Only one profile should be associated with each monitored folder. Running two profiles on the same folder may cause emails to be processed twice or not at all.
Note: If you don't delete processed emails or specify a processing folder, emails will be repeatedly imported as there is no indication that they've already been processed.
Note: Dynamic fields are not supported in Email Archive.
Making Email Archive Operational
Email Archive profiles will run automatically if the Laserfiche Email Archive service is running.
To start the Laserfiche Email Archive service
- Open Laserfiche Email Archive Configuration from the Windows Start Menu.
- Click the green play button to start the service.
To stop Email Archive profiles from running
- Open Laserfiche Email Archive Configuration from the Windows Start Menu.
- Click the red stop button to stop the service.
Deleting a Profile
- Open Laserfiche Email Archive Configuration from the Windows Start Menu.
- Select the profile you want to delete.
- Click the Delete profile button, or select Delete profile under Profile in the main menu.
Advanced Options
- Mail Cache Information
- Editing the Email Archive Service's Configuration File
- Changing the display language for Email Archive: From the Configuration Utility, select the Settings menu and then Utility options. Select a language from the drop-down menu, and click OK. Restart the Configuration Utility to switch to the new language.