Email Import
Overview
The Email Import module can be used to import data from the Subject and Body of Emails that are received. Once emails have been imported, they are deleted from the mail server.
Navigate to Menu button > Email Import.
Fields explained
Type - Set to POP3 or to POP3 (No SSL)
Description
Host - POP3 server name - eg. mail.server.com
Username - Email Address
Password - Email Password
Update SQL - Right-click and select Edit SQL - See below for a description of what the SQL must contain.
Schedule - Right-click and select Edit Schedule. This will determine how often the mail server is checked for new messages. An Interval of 15min is recommended
SQL
The following SQL can be used to receive emails into the Inbox using the standard procedure INBOX_IMPORT. (This standard procedure can of course be replaced by a custom procedure.) Use the Template button to generate the SQL below.
execute procedure INBOX_IMPORT
(
:DATESENT, -- Date
:CONTENTTYPE, -- Varchar(30)
:FROMEMAIL, -- Varchar(100)
:EMAILSUBJECT, -- Varchar(255) - The Email Subject will be truncated to 255 characters.
:EMAILBODY -- Blob sub-type text
)
The INBOX_IMPORT procedure will do the following:
Check that the email body contains text - if the body is blank, the email is not imported
Remove blank lines, tabs as well as leading and trailing spaces from the body
Insert the email into the INBOX table
Execute procedure INBOX_SETTYPE to assign an Inbox Type based on the rules that were created.
Testing
Right-click on a record and click the Test button. The Test will not delete emails from the mail server.