The only way of discovering the limits of the possible is to venture a little way past them into the impossible.

— Arthur C. Clarke               

Anatomy of an Email Part 2: Internet Email

Time Matters offers two integrated methods for sending and receiving email; TM Email and Internet Email. We covered the former in Part 1 of this series, be sure to read the introductory article on Internal Time Matters Email. Understanding the distinction between the two is critical to understanding how to keep a smooth running email management system in Time Matters. We continue this multi-part series on using email (in Time Matters) with a discussion focusing on the application’s internet (POP3 and SMTP) Email system.

Down to Business: What is the life cycle of an Internet Email?

One of the driving factors for writing this article was when I began to answer questions to our MobileTM customers about the Email List in MobileTM (we had specifically added this capability because these emails are not available when outside the office). I decided to put together a holistic view of the internal life cycle of these messages to better equip us with an understanding of the flow. Let's follow what happens to the underlying values of an Email as it moves through the system.

The Life Cycle of an Internet Email in Time Matters

CASE #1: Create an Email, do not send.
A single record is added to the Time Matters Email  database table, with the following pertinent field values:

     user_name = logged in user
     parent_id = *DRAFT
     type = D
     showinbox = Y (default but can be changed)
     showlist = Y (default but can be changed)
     to_addr, cc_addr and/or bc_addr may have values


CASE #2: Open an unsent Email (from #1) and send.  
The SMTP server will be contacted to deliver the message and the record will now be modified as follows:

     parent_id = *SENT
     type = S
     showinbox, showlist no change
     eve_id now has unique identifier from SMTP server for sent email


CASE #3:  Receiving Internet Email
1 record is added to the Time Matters Inbox database table with the following pertinent field values:

     user = tm login user
     parent_id = *IN
     type = BLANK/nothing
     Showlist = N, Showinbox = Y

1 record is created in the Time Matters PopUID database table.
NOTE: This record prevents duplicate emails from being downloaded when "leave on server" is enabled under the email account settings.


CASE #4: Open the Incoming Internet Email Record (from case #3) Change the Showlist to Y.
The Record from case #3 is DELETED from the Inbox Database Table.
A new record is added to the Email Database Table (fields copied from Inbox table) with the following pertinent field changes:

     Type = BLANK/nothing     
     parent_id = *IN

 

Summarizing the Details

When an Internet email is sent from Time Matters, a record is created in the Time Matters Email database. Upon transmission of the email, a server id will be placed in the eve_id field of the Email record. Visibility of the email is based on the ShowInbox and ShowList values.

Incoming Internet Email is significantly different than any other form of Email in Time Matters. For starters, these email messages are initially stored in the Inbox database table with a sibling record created in the PopUID table to prevents duplicate emails from being downloaded from the POP3 server.

If or when an Incoming Internet Email is set to Show On Email List it will be deleted from the Inbox database table and added to the Email database table. This is the norm when assigned a Contact/Matter regarding line to an incoming email.


Implementing What We Know About the Internet Email Life Cycle

As with TM Internal Email, there are four primary ways to view Email in Time Matters; the Inbox, Email List, Form Sublist and on a Powerview. The latter three options are very similar in that they require the Show on List option to be checked. Similarly, to be visible in the Inbox, the record must have Show on Inbox checked.

Outgoing Internet Email are saved in the Email database table with a server ID in the eve_id field.

Incoming Internet Email are saved in the Inbox database table.

The PopUID database table indentifies incoming email that have already been downloaded.

Incoming Internet Email changed to Show On Email List will delete the underlying Inbox database record and add an Email database record.


If an Email should show on the Contact/Matter Sublist Tab, ensure to complete the regarding line and ENABLE “Show on Email List”.

If an Email is not set to Show on Email List, it will not be visible on the main Email List, Form Sublist Tabs or on the Powerviews.

If an Email is not set to Show on Inbox, it will not be visible in the Draft, Sent or Deleted folders of the Inbox.

When a deleted record is set to show on the Email List and NOT set to show in the Inbox, it will become orphaned (forever) due to the fact the Email list filters Email in the Deleted Folder. The next version of SharpShooter (1.20) will test for the existence of this condition.

NOTE: There is a current issue that will display Email in Powerviews that are not marked for "Show on Email List".

 

The next article in this series will cover Email Attachments.