Help Integrate a New Email Program with Studiometry

This post contains information about how to program a new email client to work with Studiometry. This is an advanced topic and is not recommended for beginners. Please first check out the post about how to Integrate Studiometry with a compatible Email Client.

 

Studiometry 9.0 and newer has the ability to automatically import incoming (and outgoing with certain applications) emails as Logs. 

If you use a program for email that is not currently supported by Studiometry, you may be able to create the integration yourself using Scripting in your mail application. To save yourself some time, please make sure that your desired email application isn't already compatible with Studiometry.

 

Compatible Email Applications:

  • Apple Mail
  • Microsoft Entourage (Mac)
  • Microsoft Outlook (Mac)
     
Soon-To-Be Compatible Email Applications:
  • Microsoft Outlook (Windows)

Limited Compatibility Email Applications:
  • Postbox (Mac) can be selected for Studiometry's default outgoing email client

1. Integrating a new Email Client: The Basics

The first thing you need to understand about how to integrate a new email client is how exactly Studiometry integrates with the current compatible email clients. The following is the process of how your email information can get from an email client into Studiometry
  1. A script, plugin, or other method will grab the email information, and export it to a formatted text file that Studiometry can import in a location that Studiometry knows. This will happen at different intervals or events based on the email client and methods used to export the emails.
  2. Studiometry periodically checks the known location for text files that can be imported. If a file is there, Studiometry will read the file for email information, pair it with items in Studiometry, and then delete the text file. 
That's it. If you're creating integration for a specific email client, all you'll need to do is step 1 (to the specifications listed later in this article). We use AppleScript, VBScript, and other methods for the currently compatible email programs.

2. Text File Format

The text files that Studiometry imports have several fields surrounded by field tags. The order of the fields does not matter, but the information in the fields must have identical field tags before and after the content. For example, the Message Content field will appear in the text file as follows:


<!STDMessageContent>Sample Content<!STDMessageContent> 


For a file to be imported into Studiometry it must contain the STDMessageSubject string. Most other fields are optional and will either be left blank or filled in with default values, but if you do not have the STDMessageSubject in the file, the file will be ignored completely.


Field Values

 

<!STDMessageContent> The content of the actual email.
<!STDMessageSubject> The email's subject.
<!STDMessageSender> The email address or name of the sender.
<!STDMessageRecipient> The email address or name of the recipient.
<!STDMessageDate> The date of the email message in SQL date format. This format is as follows regardless of local date format settings: YYYY-MM-DD
<!STDMessageTime> The time of the email message. The message time must use 24-hour format. This format is as follows regardless of local time format settings: HHMM
<!STDMessageID> The referencing message ID for the original email. This can be used to open the email in your email client, and also to reference the same email sent to multiple recipients. The message ID is an accessible field from some email clients and is generally similar to the following format: 3C68837F-43CD-9969-9584-A628D951C402@me.com
<!STDHeaders> The headers of the actual email. Some email programs do not give access to the Message ID, so you can pass the headers directly via this variable and Studiometry will attempt to extract the associated message ID.

 

3. Text File Save Location

Once you've created an appropriate text string using the content and field values, you'll need to save it to Studiometry's MailImport folder. This folder is within Studiometry's default data folder location.

  • On Mac can be found at: Home/Library/Application Support/Studiometry/MailImport/
  • On Windows, the location varies, but Studiometry will automatically create the folder once you enable mail integration.
You'll need to simply tell your script to save the text file to that location. The name of the text file does not matter as long as it contains the required fields, but we recommend using some type of unique or random ID generator to ensure that multiple files can exist within the folder without issue.

 

 

Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    Pete Resnick

    What needs to be done to use a different email program for outgoing mail?

  • 0
    Avatar
    Robert Rabner

    Regarding integrating third party mail apps with Studiometry, Considering Entourage doesn't even exist any more it might be time to update the "send mail with" options. I for one would love to see Airmail as an option but I realize there are lots of small mail apps out there and you can't add them all (unless of course you can)

Please sign in to leave a comment.
 
Powered by Zendesk