Syncing Your Email to Your CRM

A recent chat with a customer reminded me that there are still many companies out there running their own in-house CRM, or similar, and facing the very real problem that their email is received and stored separately to the rest of their customer information, which is accessible in their CRM.

A product of mine from ‘back in the day’, ContaxCRM, solved this problem with email sent and received being synced into the CRM, against the correct Customer / Supplier / Prospect – and it did this on both Windows and macOS.

In this post I am demonstrating part of this solution for macOS only, using Apple Mail.  Of course this can easily be modified and extended to work with other email packages should you wish to do so.  This post basically covers how to extract the received emails and store them in such a fashion that your CRM can read, parse and save this information to the CRM database the next time the CRM is launched.

The first thing to do is to install the Apple Script that does all of the heavy lifting.  You can see the Script below, and Download it from here.

capture1

This script needs to be stored in the appropriate location on your Mac.  You can see the location in the image below, generally ~/Library/Application Scripts/com.apple.mail/

capture2The second step is to open your Apple Mail Preferences and navigate to the Rules Tab.  From here you need to setup a new rule to execute the script whenever a new email is received.  See the image above.

That’s it !  A text file will be created (if necessary) and appended to with the full contents of every email received.  You can setup the Name and Path for the text file from within the Apple Script.

Parsing the text file, extracting the email address of the sender and saving this to your CRM is straightforward but will differ depending on your application, development software and requirements.

Hopefully this will be of use to someone out there 🙂

Looking for an App creating for your Windows or Mac Computer? What about an App for your iOS or Android Tablet or Phone, or A Web App? Bespoke, Custom, High Quality Applications. Contact Us

Easy to Use SQL Tool | oneSql 101: Preferences

Visual Guide to oneSql: Part 3

New, Easy to Use, Fast, Cross Platform, Multi-Language SQL Query Tool: oneSql

 

prefswindow1

prefswindow2

 

prefswindow3

 

busbannerAffiliate Links

 

Easy to Use SQL Tool | oneSql 101: Connections

Visual Guide to oneSql: Part 1

New, Easy to Use, Fast, Cross Platform, Multi-Language SQL Query Tool: oneSql oneSql Connection Window   busbanner Affiliate Links

Listbox Exporting: Take 2

Following on from a previous post last week where I talked about exporting data from a Listbox in Xojo / REALStudio, I decided to build a general purpose export routine with the extra features that were commented on and also some extra features that I believe make this routine even more useful.

Note: This is not the only way of programming a generic export function and no doubt it is not the best. It does however work and work well.

This export routine is a single simple function and is accessed by sending a string of parameters and having the results of the export request returned as an Integer containing different values depending on the success or what kind of failure occurred.

The parameters that are required by the function are:

  1. Delimiter (Comma, Tab (chr(9)), Full Stop etc.)
  2. Headings (YES or NO)
  3. Name of the Source Listbox
  4. Filename Extension (Tab, Csv etc.)
  5. Default Filename (Export.txt)
  6. Surround with Quotes (YES or NO)

A call to this export routine would therefore look something like this:

www.stevencholerton.com

For ease of reading and maintainability this is better:

www.stevencholerton.com

The actual export function itself looks like this:

www.stevencholerton.com

Note: There is a small error in the picture of the export function above. This error has been fixed in the Text download. Thanks to Axel Schneider on the Xojo Forums for pointing this out. 

To download the export function as text, please click here

blog_footer.png

Products
Affiliate Links

Xojo / RS Export Listbox

I’m going to start adding some software development tips and tricks and other useful bits and bobs to this site with the hope that other people can learn and benefit from my knowledge and experience in the same way that I have learnt, and continue to learn, from others.

I’m not sure yet if there will be a particular focus or even how often I’ll post – but that will become apparent over time.

I’ll start with this; a simple method, written in Xojo / REALStudio, to take the contents of a Listbox and generate a Tab Delimited export to a text file for every row and every column in the Listbox. In this example the Listbox is named lstTemp and you will have previously populated it with your data.

  ‘Export the List as Tab Delimited
  if lstTemp.ListCount = 0 then Return
  dim f as FolderItem
  dim t as TextOutputStream
  dim intRow, intColumn as Integer = 0
  f = GetSaveFolderItem(“txt”,”Export.txt”)
  if f = Nil then Return
  t = f.CreateTextFile
  for intRow = 0 to lstTemp.ListCount-1
    for intColumn = 0 to lstTemp.ColumnCount-1
      t.Write ConvertEncoding(lstTemp.Cell(intRow,intColumn),Encodings.SystemDefault)
      t.Write chr(9)
    next
    t.Write EndOfLine
  next
  t.Close

Originally when I published this on a previous blog, I had some feedback from a friend of mine and fellow Developer, Eric Gibbon of MacTasks. This is what he had to say:

The code is quicker if you store the lstTemp.ListCount-1 and lastTemp.ColumnCount-1 in local variables, as for every loop iteration your code calls the ListBox to get its ListCount or ColumnCount value and then subtracts one. However if these values are stored in local variables this repeating does not happen. For a small list this will not matter but for larger ones there will be a performance difference. So the code would be like:

dim nRows as Integer = lstTemp.ListCount – 1
dim nCols as Integer = lstTemp.ColumnCount – 1
for intRow = 0 to nRows
  for intColumn = 0 to nCols
  next
  …
next

 

It would also be nice to add a parameter to your routine for “Include Headings” and write the ListBox headings to the file first if this parameter is True.

I hope this helps someone.

Blatant Advertising: New Xojo / REALStudio DataViewer Component

blog_footer.png

Products
Affiliate Links

Software Help: R10Cipher

Software:            R10Cipher
Author:                Steven Cholerton
Last Update:        July 2013


Registering R10Cipher

After downloading R10Cipher and deciding that you would like a full working copy, you can purchase this directly at the following web address:


Once you have done this we are automatically notified of your purchase and a User Name and Serial Number are sent out to you via email.  The Serial Number is tied to your Name and the two must be used in conjunction.

Note: R10Cipher 5 needs a different serial number to previous versions.  Existing users can upgrade at reduced cost for a limited period.  Please contact upgrade@artenscience.com for further details.

When you receive the serial number email you should follow the included instructions.  In a few seconds R10Cipher will be fully licensed and ready to use.

Our licensing allows one purchase to be installed on two computers that you own, for example your desktop and also your laptop.  Please respect our efforts and purchase additional licenses if you need to install on multiple computers.  We also offer discounted licenses for families, corporations, charities and educational establishments.

Any problems with registration, please email us at: support@artenscience.com


Introduction

R10Cipher is a simple but extremely powerful Cross Platform Encryption / Decryption tool.

R10Cipher takes text or files and encrypts them using up to 384 bit Blowfish encryption.

These files can be Word files, Excel files, MP3 files – almost any kind of file.

These encrypted files can be copied elsewhere, even to a different operating system and unencrypted by anyone in possession of the Shared Secret that was used for the encryption. If encrypting text, the Cipher Text can then be copied into an email, saved as a file and attached to an email or just copied elsewhere.

The recipient can use R10Cipher to open the file and view the encrypted contents, assuming they are in possession of the Shared Secret that was used to encrypt the document in the first place.

If encrypting a file the encrypted file can be stored or sent in the full knowledge that the contents are not visible to anyone without access to R10Cipher or cuteCipher and the Shared Secret.

Decryption can be carried out just by double clicking the encrypted file and entering the Shared Secret.

R10Cipher supports batch encryption by drag and drop to make encryption fast and painless, even when dealing with dozens of files.

As R10Cipher does not require installation you can for example copy the Mac, Windows and Linux versions of R10Cipher to a USB drive along with your encrypted documents and files.  Your documents and files are secure ,but available whenever and wherever you require them.

R10Cipher does not make any alterations to your computer and stores the configuration files within its own folder.

Many people do not realise that sending an email is the equivalent of sending a postcard, it’s contents are easily visible. For many companies, individuals and markets this is totally unacceptable and with the potential complexity and setup issues with the Public Key Encryption systems it makes sense to encrypt using R10Cipher.

R10Cipher, like all software, is a work in progress.  We need your feedback to keep R10Cipher the best Cross Platform Encryption Tool available.  Contact us with your suggestions and comments.

R10Cipher 5 is a major rewrite with additional functionality that was asked for by our customers.  5 is also slicker, faster and easier to use than ever before.  Encryption has never been so painless.


Text Encryption

Enter your Shared Secret (this is your encryption key) into the area at the bottom left of the screen.  This can be between 4 and 56 characters.  For example:  yuetrtytpl*565r0.  Enter your Shared Secret again in the area directly below to confirm that you did not make any typing errors.

Important Note:  The strength of the encryption is directly related to the length of your encryption key.

Enter the message or text you wish to encrypt into the large text area to the right.  You can right click and Paste the text, or use Drag and Drop if you wish.

Select the Encrypt button (There is also a Menu Option and a Hot Key Shortcut).  You will see the encrypted text shown in the text area on the left of the screen.

You now have a number of options:

1. Click the Email button and an email will be opened for you with the encrypted text as the message.

2. Click the Clipboard button and the Encrypted text will be copied to clipboard, ready to be pasted elsewhere.

3. Click the SMS button and the Encrypted text will be sent to the phone number you input.  This option assumes you have purchased SMSRelay or subscribed to the SMSRelay service.

4. Use the Save option on the File Menu and save the Encrypted text as a document.


Text Decryption

To Decrypt a message or text use any of the following options:

1. Open an Encrypted document using the Open option on the File Menu

2. Paste the Encrypted text into the cipher text area to the left of the screen.

3. Drag the Encrypted text into the cipher text area to the left of the screen.

Enter the Shared Secret and Select the Decrypt button (A Menu Option and Keyboard Shortcut are also available) to view the Decrypted contents.

You can then do any of the following:

1. Select the Print button on the Toolbar and output the Decrypted Text

2. Select the Speak button on the Toolbat and listen to the Decrypted Text as it is read to you by your computer.


File Encryption

Enter your Shared Secret (this is your encryption key) into the area at the bottom left of the screen.  This can be between 4 and 56 characters.  For example:  yuetrtytpl*565r0.

Drag and Drop your files over the large text area on the right of the window. Your documents will be Encrypted and placed on the Desktop.

The filename for the Encrypted files remains the same but the file extension is changed to .r10Enc.

This activity will be logged to the Activity Log. Following the encryption, this will show you details of the encryption process. The Activity Log can be viewed by using the option on the View Menu.

Optionally the Log can be saved to the database by activating the option within the Preferences screen.

For average size documents and files the encryption will be virtually instantaneous.


File Decryption

There are three ways to Decrypt files with R10Cipher.

Decrypt a File from Within R10Cipher

Enter your Shared Secret (this is your encryption key) into the area at the bottom left of the screen.  This can be between 4 and 56 characters.  For example:  yuetrtytpl*565r0.

The first way is to open R10Cipher and choose the Open option on the File Menu. R10Cipher will then ask you to select the file that you wish to Decrypt.

Once selected R10Cipher will ask you for the name you would like to call the decrypted file, the original name is used as the default.  The decrypted file will be saved with the name, and at the location, you chose.

Drag and Drop Decryption

Enter your Shared Secret (this is your encryption key) into the area at the bottom left of the screen.  This can be between 4 and 56 characters.  For example:  yuetrtytpl*565r0.

Drag and Drop your encrypted files over the smaller text area on the left of the window. Your documents will be Decrypted and placed on the Desktop.

Double Click a File to Decrypt

R10Cipher 5 attempts to make working with encrypted files as simple as possible.  Therefore any encrypted file can be decrypted just by double clicking the encrypted file.

Following the double click you see the R10Cipher File Decrypt window.

Enter the Shared Secret that was used to encrypt the file and press the Continue button.  R10Cipher will save the decrypted file to your desktop with the original file name.

NOTE:  Before you use this feature for the first time you may need to associate the R10Enc files with the R10Cipher Software.  How you do this depends on your Operating System.  We have instructions in the Manual Addendum for Mac OSX and Windows XP.


Key Creation

The creation of keys is done by selecting the following Menu Option:

     Key Management
          Key Creation and Administration

You will see the Key Creation and Administration window.

This is where you setup your clients/contacts and your/their Shared Secrets.  In addition, for each client you setup you can assign two passwords, a Master password and a Usage Password.  For an explanation of the two passwords see the Key Management Introduction section.

To Insert a contact, just start typing and fill in the five information fields, from Name to Usage Password.  When complete press Save, and Save again to confirm.

To Edit a contact, select the contact from the list on the left hand side of the screen.  You will see the Name and Email Address but the Shared Secret and the Passwords are encrypted and not readable.  To view this data and edit it you need to input the Master Password for this contact into the Decode Password area of the screen and press the Decode button.  You can then edit the information and save it using the Save button.

To Delete a contact, select the contact from the list on the left hand side of the screen.  You will need to input the Master Password for this contact into the Decode Password area of the screen and press the Decode button.  You can then press the Delete button to erase the record.

Note:  Deleted records are gone and cannot be retrieved.

If you intend entering a number of clients or contacts you may already have them stored in a database or spreadsheet somewhere.  If that is the case then you should Import the records which will save you time and increase information accuracy.

Note:  You will need to edit each record later to apply the Shared Secret and Password(s).

To Import records you have three choices which can be selected using the Radio buttons on the bottom left of the window.  When you have selected the type of import you require press the Import button.  The three choices are Tab Delimited, Apple Address Book and the ContaxCRM Database.


Key Retrieval

Scenario 1: Encrypting or Decrypting Text or a File from within R10Cipher

In these circumstances instead of having to remember and enter the Shared Secret for the contact you can instead select the Keys View (from the View Menu) and input the Master or Usage Password for the appropriate contact.  Then choose the contact from the list.  You can search for the contact and filter the list using the search box on the bottom left of the screen.

Select the contact in the list.  If you have entered the correct Password the indicator will change from red to Green and the Shared Secret fields will be populated.

You can now encrypt text or files without having to enter the Shared Secret.

Another Advantage of retrieving the Shared Secret from the Key Management Database is that if you are sending an encrypted email, R10Cipher will know the email address and fill in the email header appropriately.

So instead of having to remember lots of Shared Secrets and Email Addresses, you only, using the Key Management Database, have to remember a minimum of one Password.

Scenario 2: Double Clicking an Encrypted File to Decrypt It

When double clicking an encrypted file you now see the R10Cipher File Decrypt window.

In these circumstances instead of having to remember and enter the Shared Secret for the contact you can instead input the Master or Usage Password for the appropriate contact.

You can search for the contact and filter the list using the search box on the bottom left of the screen.

Select the contact in the list.  If you have entered the correct Password the indicator will change from red to Green and the Shared Secret fields will be populated.

Click Continue to decrypt your file.

###