IOC Import Emails to Notes Fix (Office365)
The IOC Import Emails to Notes Fix is meant to serve as a temporary solution for institutions whos stock email import has stopped working due to the new login requirements Microsoft has implemented on their Office365 IMAP connections. Instead of using IMAP, the IOC email import retrieves emails using Microsoft’s Graph API and an Azure App with a secret key for authentication. In order to use this fix your IT department will need to setup the appropriate Azure application and permissions, and install the fix on your Sunapsis server.
IMPORTANT: The IOC Emails to Notes Fix is being provided free of charge with no warranty and it is in no way supported by Indiana University or the Sunapsis support team. You use this fix at your own risk.
Last Updated: 11/18/2022
- IT will create an Azure App with a secret key and assign the app the appropriate permissions to read and write email information. More detailed instructions can be found here. IOC Import Email To Notes – Azure Configuration
- Install the files on your Sunapsis admin server.
- Copy the IOCemailimport.cfm and IOCemailimportconfig.cfm files (link below) for your version of Coldfusion into the webroot/ioffice/batch/ folder on your admin web server.
- Populate the settings for the tenant, email, clientid, and clientsecret in the IOCemailimportconfig.cfm file using notepad.
- Test the import process by accessing the following url https://*youristarturl*/ioffice/batch/IOCemailimport.cfm?id=*yourbatchid* from a browser. The page should display the results of the email process. Your batch id can be found at the end of the urls in your ColdFusion scheduled tasks or in the configbatchid table in the database. If you receive an error, check the Sunapsis tech logs or the coldfusion-out.log for more information. Note: If you make any changes to the IOCemailimportconfig.cfm file, you must clear your CF template cache.
- Once it’s confirmed that the import is working as expected, update the your CF scheduled tasks to run the IOC import process as desired.
The IOCemailimportconfig.cfm file contains a few additional settings that you may choose to use.
- testmode: Setting testmode to 1 will allow you to run and view the results (when triggering the import through your browser) of the email evaluation process without actually importing any emails into the database or moving any emails to Deleted Items. Set testmode to 0 once you’re ready to actually import the emails.
- daysToKeepUnidentified: Normally, if the email import process can’t identify a client record to import the email into, the email simply sits in the inbox until someone manually cleans it up. If you set the daysToKeepUnidentified setting to greater than 0, the import process will delete emails it can’t import to a client record after the number of days you set.
- daysToKeepBadSender: The import process only imports emails that have been sent to the mailbox by an email address of a user in Administrative Users or an email address that is assigned to an alert group. This avoids importing emails that are unintentionally sent to the import email box by students or other departments, etc. Normally these emails sit in the inbox until they are manually deleted. Setting the daysToKeepBadSender value to greater than 0 will cause the email import process to delete emails from bad senders after the number of days you set.
- allowedDomains: This is a list of three character top level domains (edu,gov,org) from which any emails will be imported, regardless of the sender.
- verbose: Setting verbose = 1 will display the Subject, From, and To information for emails when the IOCemailimport.cfm page is triggered in a browser. For security reasons, it’s suggested to leave the value set to zero unless you are troubleshooting.
Download Link: IOC Import Email To Notes Fix (Office365) 03/08/2023
2023-02-02: Fixed CC email addresses not being imported correctly
2023-02-09: Added allowedDomains and verbose settings
2023-03-08: Update imported email datestamp to be date received instead of date imported.