Jump to content

Email To Prime

From Prime 16 Online User's Manual
Revision as of 15:19, 17 February 2022 by Jspenceratty (talk | contribs) (Email Requirements)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Overview

The Email To Prime system is an optional, automated system that takes emails sent to a specified email address, reads in the case number from the subject line, and then adds the plain text portion of the email into the case notes for the specified case. The email is then forwarded to a notification address with information on whether it was successfully added or not. If it was successfully added, a staff member may follow up in the case or with the PBI Attorney. If it was not successfully added, the staff person can manually add the information to the case, or correct/add the case number to the subject line and send the email back to the system for processing again.

Email Requirements

The subject line must include the following, by way of example: "Casenum: 21E-4010402" Obviously, the case number (represented by "21E-4010402") must be an appropriate and existing case number in Prime.

The email must have a plain text section. This is the portion of the email that is copied into case notes.

Your email server must be a supported version. This system has been tested against generic forms of gmail and office365 servers. The email accounts must utilize an IMAP system for email retrieval and an SMTP system for email sending.

Setup

There are several pieces to the system that are set in the setup page (inpEmailToPrimeSettings). This setup page can be opened from Admin-->Custom Admin ("Email To Prime Settings").

Each name has a value. Do NOT attempt to change the field name. If you do not see all these items, press the Check Setup button.

Incoming Email Settings
Field Name Example Value Description
emailpickuppassword ThisIsMyP@ssw0rd!! Password for the email account from which email will be retrieved and reviewed.
emailpickupport 993 The IMAP port for the email account from which email will be retrieved and reviewed.
emailpickupserver imap.gmail.com The email server name for the email account from which email will be retrieved and reviewed.
emailpickupusername cases@yourdomain.com The username for the email account from which email will be retrieved and reviewed.
emailpickupusessl true Whether to use SSL for the email account from which email will be retrieved and reviewed. (true or false)
Email Notice Settings
Field Name Example Value Description
noticeemailaddress probonogroup@yourdomain.com The email address to which notices of action should be sent. This should be a group of people in your organization.
noticeemailname Pro Bono Group The name to which notices of action should be sent. This is used with the noticeemailaddress to show like this in emails: "Pro Bono Group <probonogroup@yourdomain.com>"
Sending Email Account Settings
Field Name Example Value Description
sendingemailaddress cases@yourdomain.com The email account that should be used to send notices. This will probably be the same account being used for pickup, so replies will come back to the same place.
sendingemailname Email To Prime System The name on the account that should be used to send notices. This is used with the sendingemailaddress to show like this: "Email To Prime System <cases@yourdomain.com>
sendingemailpassword ThisIsMyP@ssw0rd!! The password for authentication to the account that should be used to send notices.
sendingemailusername cases@yourdomain.com The username for authentication to the account that should be used to send notices. This is probably the same as the sendingemailaddress.
sendingsmtpport 587 The smtp port for the account that should be used to send notices.
sendingsmtpserver smtp.gmail.com The smtp server for the account that should be used to send notices.
sendingsmtpusessl true Whether ssl/tls should be used for the smtp server for the account that should be used to send notices. (true or false)
sendingsmtpusestarttls true Whether starttls should be used for the smtp server for the account that should be used to send notices. (true or false)
Prime Case Note Field Defaults
Field Name Example Value Description
useofficenumber 9999 The office number to use in the case notes for the new entry. This must be a valid office number in your system.
usestaffnumber 9999 The staff number to use in the case notes for the new entry. This must be a valid staff number in your system.
URLs for Setup Page Use (buttons)
Field Name Example Value Description
CheckSetupURL https://localhost:44382/GetEmails.asmx/CheckSetup?securityid=MyIDGoesHere The URL for Prime to use (in the setup page) to hit the CheckSetup routine. This will be set by Kemp's Case Works staff and should not be changed.
RetrieveEmailsURL https://localhost:44382/GetEmails.asmx/RetrieveEmails?securityid=MyIDGoesHere&runmanual=true The URL for Prime to use (in the setup page) to hit the manual RetrieveEmails routine. This will be set by Kemp's Case Works staff and should not be changed.
Automated System Enabled
Field Name Example Value Description
enableautomatedsystem true Whether the automated system should run and attempt to retrieve emails. (true or false). Leave on false

Check Setup

Use the "Check Setup" button in the setup page to:

  1. Ensure the system can reach and open the SQL server database (Prime)
  2. Check for the required tables
  3. Check for the required fields in the setup table
  4. Ensure the system can connect to the IMAP server
  5. Ensure the incoming email address has other required folders (Prime-Ignore and Prime-Finished). Do NOT delete or remove the folders from the email server.
  6. Ensure the system can connect to and send email through the SMTP server

Failures in any system will result in the entire system failing. You must make sure all parts of the System are operating properly. You can regularly use this button to ensure all parts of the system are working as expected. For example, some email accounts expire passwords. If you change it on the email server, make sure to change it here. Then use the "Check Setup" to make sure the system is still operating properly and can gather email and send notices. Also remember to periodically check the Logs to make sure they do not have warnings or errors in them.

Retrieve Emails

Use the "Retrieve Emails" button in the setup page to manually prompt the system to retrieve and process emails in the email inbox. During normal processing, the system will processing incoming email every hour (when the enableautomatedsystem is set to true). During testing, if you want to prompt the system to run more often, use this button. It contains a special URL query string "runmanual=true" to bypass the automated system that could otherwise be disabled.

Logging

Activities of the system are logged in the table "EmailToPrimeLog". Review that log if you have issues.

Use

Emails can be sent to the email address you have set up. This is typically the same as the emailpickupusername in the settings.

The email subject should be in this format: Casenum: <CASENUM> So, for example, the subject might be: Casenum: 21E-2014034

The body of the email should have the information to be copied to the case note.

The case note will be entered with default values for office and staff number as designated in setup.

Work Flow

Here's what the system does in processing email:

  1. Pick up email.
  2. Process subject line looking for "Casenum:" if that doesn't exist, the email is forwarded to the notice email address for manual processing. Move to the "Prime-Ignore" mailbox.
  3. Process subject line looking for the case number. Test the case number against the system to see if it is a valid case number. If not, the email is forwarded to the notice email address for manual processing. Move to the "Prime-Ignore" mailbox.
  4. Copy the text portion of the email to a case note with a special note in it that "The following note is added from the Email To Prime API system". The note type is "Email To Prime Case Note". The staff and office numbers are the defaults entered in setup.
  5. Send email notice about the action to the notice group.
  6. Move the email to the "Prime-Finished" mailbox.