In this post I would like to share with you a nice approach for building mail integration solutions based on:
- Native capabilities of IBM Lotus Notes to create eml-files from dragged 'n dropped emails
- IBM Notes sidebar
- HTML 5 File API
Though the approach is simple I think it has a good potential to be used for many solutions.
So, the general task is next: we need to let IBM Lotus Notes users to drag 'n drop required emails from their Notes mail databases to a sidebar widget to send these emails to some external system (CRM, ERP, any back-end...).
When I started to investigate possible solutions I found a few examples (btw, there are not so much information about such kind of tasks in Internet) mainly based on Java, Eclipse extensions and so on - in other words based on technologies where I am not good enough (at least yet ;-) ). I was looking for something more simple and finally I decided to go with the following approach.
1) As you may know IBM Notes R 8.5.2 (standard configuration, not basic) allows to enable automatic creation of eml-file from drag 'n drop emails. You can turn it on here:
The only one limitation here is that it works only for emails. In case of standard calendar items and standard tasks it creates URL-files like notes://server/database/view/unid?opendocument
2) Another one thing we need is a Web page, that is capable to work with dragged 'n dropped files (our IBM Notes emails converted to eml-files) using File API that is introduced with HTML 5 and supported by all modern browsers. Let's look for such examples in Internet. There are many of them:
http://html5demos.com/dnd-upload (only images)
So at this point we can utilize the inbuilt feature of IBM Lotus Notes to get eml-files from required IBM Notes emails and we have a Web-page that is capable to process dragged and dropped eml-files using File API + HTML5 and upload these files further to any external system, using Web-services for example.
3) Now we need to incorporate our Web page into IBM Lotus Notes sidebar and test the approach with IBM Lotus Notes emails.
Here is a list of steps I have performed in order to get required sidebar widget.
3.1 Launch IBM Notes and go to Tools\Widgets\Getting
Started with Widgets
3.2 Select “Web page” in the next dialog window
3.3 Enter
URL of required Web page
3.4 Select the first option on the following dialog
window (provide credentials if required)
3.5 When
you click button [Next] a Web page should be displayed in the following dialog window.
If you look at it you may notice that Web page tells you that current browser does
not support FILE API. The reason of that is that
by default IBM Notes client uses an embedded browser as a sidebar browser that is very poor
actually – something like IE6, not sure exactly.
3.6 Select option "Xulrunner" in "Embedded browser" field. It is a Mozilla runtime for XPages introduced in 8.5.2 so it
is more or less modern
3.7 Select
“Display as panel” in the next dialog window
After you clicked OK you have to get something like this:
Now you should be able to drag and drop emails to the
created widget to send emails as files (even with attachments) to remove server
Sidebar widget can be sent by email, published to catalog
or exported to xml-file.
That’s it.
Of course, it is only approach.
There are still many points which should be considered and taken into account and probably some of them will not allow you to go this way, like:
- authentication/authorization points to let only right people to send eml-files to external system
- how to perform mass installation/uninstallation
- how to support it for roaming users
- how to implement some configuration entry point to be able change f.x. uploading parameters, like URL of remote server, credentials, Web-service name and parameters etc.
However all these points must be considered and covered anyway, even with Java based solution.
With approach like that we can get workable prototype very fast and focus on conversation with Web-service of external system or any other uploading solution.
It looks native, works fast, do not need to develop custom drag 'n drop handlers, mail converters etc.
Note*: when I started to work on this post I used http://html5demos.com/dnd-upload for sidebar widget. That time it allowed to upload any file. Currently it allows to upload only images so you have to use another example if you want to check my approach yourself.
No comments:
Post a Comment