First demonstration of a eApp/DApp integration - Decentralized Identity Management


I'm presenting here the development and usage of an eApp (email Application) build with our technology EAC (Email Active Content) connected to a DApp (Smart Contract Ethereum App) as backoffice to manage the sharing of personal identity data. But this this pattern can be use for any personal data we want first to be the only owner & to be able to control carefully with who we want to share this information. We can imagine to use this pattern for :
  • Sharing medical information
  • Sharing a grade transcript
  • Bank statement
  • etc ...
Tanks to the Blockchain and more specifically Ethereum one this become very easy to implement and thanks to EAC Technology it also becomes  very easy to use (for both developer and end user. Sharing become as simple as sending an email but with a very high level of security.

This article will present all aspects of this new way to build secured & shareable Apps !

DeMONSTRATION OF AN EApp using a DAPP - Identity management

--==== DISCLAIMER ====--

This is article intend to demonstration a simple implementation of eApps/DApp interaction, it's far from being secure implementation and it's absolutely not the purpose. AppInMail will provide in the futur a strong implementation of Identity contract linked to an email adresse, but here it's just a basic example. DON'T USE IT FOR ANY PRODUCTION & ALL WHAT YOU DO WITH THIS DEMONSTRATION IS AT EXCLUSIVELY YOUR OWN RISK.


set up the ENVIRONMENT 

To experiment by yourself all what you need is an AppInMail account & access to our Email client ProMail. The only way to start a new account in AppInMail is to receive an Email using EAC Technology, to do so we've created the first community email called Mission AppInMail, you can receive it from the page : and by clicking on Start the journey.

Figure 1 : Start AppInMail Journey

You will then receive on your mail box two emails (Check your AntiSpam in case you get nothing) from :
  • : It's the email to inform an account is open for you, you should use the link to change the self-generated password to put yours.
  • : This one is the community email (Mission AppInMail), by following the instruction provided in the picture upper you can see it directly in your email client.
But to develop eApps what we need is to access to ProMail, then simply go to if everything is ok you should have this :

Figure 2 : ProMail - EAC Native Email Client

ProMail is a very advanced Email client that support EAC Technology but also a complete solution to build Plug-In for it, here some documentation of the available API & objects :

To access to this environnement you should click first on SETTINGS :

Figure 3 : ProMail functions bar

And then to plug-in :

Figure 4 : ProMail settings page

You will already find 2 existing plug-in, but we will add an 3rd one to implement our eApp/DApp.

Figure 5 : ProMail Plugs-In page

Install our eapp/Dapp

You will find the file to install the plug-in here : 
  • IdentityDemo.xml : It's the packaged plug-in directly installable by using Add new Plug-In, you will then be able to edit or run this plug-in.
  • The other files : They are all the plug-in in separate files easy to use with repository system like GitHub, to manipulate it there is py script here
After the installation completed you will be able to see the plug-in in the list :

Figure 6 : IdentityDemo Plug-In installed

The sample identity contract we are going to use is available here :

This contract is simple storage of some key identity values with ACL. 

Let's use the plug-in to run examples.

This example is running on TESTNET network, it consists of first creating an ETH address then set some permissions to allow an other user to see some of the identity data & finally to send by email to this user a document and see how the identity informations are displayed according to the permissions.

In real life this case can be for a user to give access a shop to some of his data to deliver a parcel, then the shop doesn't have any information in his database, it is just allowed to have access to the data it needs.

Here we will start by creating an ETH Address (this is only in the case of this demo, later AppInMail infrastructure will provide automatically to any new user an ETH @ linked to the email).

Figure 7 : IdentityDemo MENU Icon

To run some functions of this plug-in, we need to click on the plugin button in the menu bar, then a sub-menu appear with the button IdentityDemo. When one click on it a menu with the differents functions (corresponding to some macro in the plug-in development environnement) will be accessible.

Figure 8 : All functions possibles

To setup the profile we will use MyProfile as it has never been set up, the system will ask to create a ETH address :

Figure 8 : Windows to create an account

By clicking on create, we will create a new wallet & send 2 Ethers to it, here the procedure :

Figure 9 : Windows to create an account

The figure 9 show the new adress created & the pending process of the transaction, the logs of ProMail  

Figure 10 : Logs 

Logs shows the interaction with the Blockchain and we can see the transaction, now we are going to to see what happen on the Blockchain.

Figure 11 : Etherscan request on the ETH Address 

And we can see the transaction has been done and the new account created got 2 ETH that will be useful now to perform some of the operation we want to do with our new account.

We will now publish the identity contract seen upper & fulfill data in. To do so, I clicked on NEXT after the creation of my account & got this windows.

Figure 12 : Simple windows to fulfill my identity data.

By clicking on [OK] I sent the transaction to the Blockchain that consist of creating my contract with the initial value, we can track on Etherscan what is happening :

Figure 13 : Contract creation on the Blockchain

Now data are stored in the Blockchain & I can access from ProMail but from any place in the world without accessing to any AppInMail API. My identity has been pushed to a decentralized network.

If I click again on the function MyProfile :

Figure 14 : Recall from Blockchain.

Now we will demonstrate how I can use this Identity to deliver inside a EAC Email only the content I want to. I will first send an email & the target user will have absolutely no access right, then the information displayed will be empty. Then I will upgrade the right and see the consequence on the exact same email.

To be able to make this demonstration, I of course need a new accout, so, I will use my Gmail account with the ETH address :  0x3bae9bf79cd57ebed274ccb0591d200ccf63e36b

Unlike other Email Client ProMail have the capacity to use specific Email Composer define as a Macro in a Plug-In

Figure 15 : Let's choose the ShareProfile Email composer.

Here under ProMail logo we have the composer selector and we have choosen ShareProfile that will run inside ProMail a specific mail composer that will send an EAC Email with a pre-selected rights. 

Because here we are at the very first implementation of the integration of Blockchain in AppInMail we are obliged to add the ETH Address, but later this will not be needed anymore, only the email address will.

Figure 16 : Share Profile Composer.

This composer is very minimalistic, it send a very basic email with just the data to display. Now let see the result in my Gmail mailbox :

Figure 17 : Email sent to my GMail account

This email is not a standard one, it's a very basic eApp that read from the Blockchain the data of the sender according to my access rights as I've no right nothing is displayed, from my ProMail I will now change the access right for this user & save it in the Blockchain.

To do so, I'm clicking on Permission and set only Read Last Name & Read Birthday like it can be seen here :

Figure 18 : Setting 2 properties

Setting 2 attributes in this implementations is 2 call to contract functions, then we can see on Etherscan the realization of it :

Figure 19 : Blockchain has processed 2 transactions

Now if we refresh the email in my GMail inbox you will see the modifications :

Figure 20 : Email updated with new rights !

As you can understand this is a very simple example, but the possibilities of this two technologies are just endless, a complete new world of decentralized application is possible making true a global digital economy !!

Digging in the implementation

ProMail is part of the game of modular product called ProSuite : all this products are designed to be expandable, it means it's possible to develop Plug-In for them, here a guide about it :

We have developed a specific language for it called VScript (VDOM Script), to make it easy to learn for the maximum users the language in its syntax and behavior is very near from VB Script. Then to write a Plug-In for ProMail is more or less the same than to develop a macro in Excel or other Microsoft's product.

Here you will find a description of ProMail Object Model :

This article is about building an eApp that communicate with a DApp (Smart Contract), we will not dig much in the eApp development, here some documentation about building eApp

We are now going to see how to communicate from a VScript plug-in to the Blockchain

Blockchain protocole in VSCript

VScript is a language compiled by our own transpiler ( to Python, this transpiler is part of the VDOM Runtime (you can see the source code here the technology used to develop either ProMail & Email Active Content.

In ProMail VScript extensions a specific wrapper has been designed to access to ( objects.Then to implement a client that perform RPC to a node you need to create a new web3client object like this :

set myclient = new web3client

What we will do now is to describe the code used in differents operations performed in the macros of teh plug-in. Most of what we will present here is not generic & must not be used for production purpose, it's given as an example to use the VScript implementation of to access to the Blockchain !

CREATE a new account for the user in Myprofile macro

What we are discussing in this paragraph are related to the macro MyProfile, the figure 21 present the code editor in the Plug-In environnement of ProMail.

Figure 21 : Code editor of the Macro MyProfile 

When the user has not yet initialized his own account on the Blockchain we need to create one for him.

The client will then connect to a node (there is one running in the AppInMail infrastructure)  by setting some values, like this = client_host
myclient.port = client_port

we will now create the account by using a given password & transfer 2 ether from the main AppInMail account, to do so we will use an other instance wallet of the client to connect to the AppInMail account.

acc = myclient.create_account(client_password)
set wallet = new web3client = client_host
wallet.port = client_portwallet.account =mainwallet
tid = wallet.send_ether(acc, 2)

The method create_account return the public key of the account.

DEploy the identity contract for this new user

abi = "[{""inputs"": [], ""constant"": true, ""name""...
code = "606060405234156200001057600080fd5b60405162001...

We assume the contract has been already compiled & we have the compiled code in the variable code (we are using for this demo this contract : ) and the abi structure is stored in the variable abi.

args = xml_dialog.get_answer
param = Array
Redim param(7)
user = appinmail.currentuser()
param(0) = user("guid")
param(1) = args("firstname")
param(2) = args("lastname")
param(3) = args("email")
param(4) = args("phone")
param(5) = cint(split(args("birthday"), ".")(2))
param(6) = cint(split(args("birthday"), ".")(1))
param(7) = cint(split(args("birthday"), ".")(0))

tid = myclient.deploy_contract(abi, code, param)

While deploying the contract the constructor is passed with the initial values of the user identity input like it can be seen in the Figure 14 upper. the special object xml_dialog with the method get_answer return the values input by the user in the form. The variable param is an array mapping the index to the value structure of the constructor.

READ the data stored in the Blockchain

As now we have stored the data in the Blockchain we can read it, the identity.sol contract define an ACL (Access Control List) to be able to read this data except if it's the owner who read it. The identity of the reader is define by the client access to the node (account & password). Here we have generic function to read the data from the Blockchain, it use a function for each peace of data to read.

To call a function of the contract it's needed only to use the method contract_call this procedure is free of gaz, only saving data on the Blockchain use Gaz.

function read_profile(client)
 d = new dictionary
 d("firstName") = client.contract_call(abi, contract_id, "getFirstName")
 d("lastName") = client.contract_call(abi, contract_id, "getLastName")
 d("email") = client.contract_call(abi, contract_id, "getEmail")
 d("phone") = client.contract_call(abi, contract_id, "getPhone")
 birthday = client.contract_call(abi, contract_id, "getBirthday")
 d("birthday") = birthday(2) & "." & birthday(1) & "." & birthday(0)
 read_profile = d
end function

The function return a dictionary of the data stored in the Blockchain.


We will now see how to define permission to allow or not an other user to see our data. One Macro is especially done for this : Permissions. We will not dig into all aspects of it, we will concentrate on the interaction with the Blockchain.

function set_permission(param, id, currentValue, newValue)
  param(1) = id
  if currentValue <> newValue then
    if newValue then
      myclient.contract_call(abi, contract_id, "grantAccess", param, 0, true)
      myclient.contract_call(abi, contract_id, "revokeAccess", param, 0, true)
    end if
  end if

end function

As we can see it's a simple wrapper over the function grantAccess & revokeAccess of the Smart Contract. To call this function we use on the instance of the web3 client the method contract_call.

The method accept this list of parameters :

  • abiApplication Binary Interface is the interface of the contract.
  • contract_id : it's the address of the contract.
  • contract_function : What is the function called on this contract.
  • function_parameters : An array of value that represent the parameters of the function.
  • ETH_amount : How many Ether are sent to the contract, in case of it's needed.
  • Transaction : Is it a transaction or a call, it means is the operation will change the state of the contract or not, if yes it will cost some Gaz. In this implementation the Gaz is internally calculated.

Sharing the data stored in the Smart contract in an EAC Email

We will now study the email macro ShareProfile, unlike the other macro this one is not added as a button in the plug-in bar, but it's part of the email composer, this is define in the parameters of the macro.

Figure 22 : Macro properties

We can see here the Location dropbox, the value Mail composer configure the place from where the macro will be lauch.

Figure 23 : Mail composer location

This dropdown allows the user to select what kind of email he wants to send. In our case, it's an email to share some of his personal data with someone else.


Pourquoi faire une ICO ?

Depuis quelques temps sur nos réseaux, vous entendez parler d'ICO, de blockchain, de Cryptomonnaies etc...
Explication :
« Le sigle ICO (Initial Coin Offering) dérive de l’expression plus connue IPO (Initial Public Offering, introduction d’une société en bourse) afin de désigner une levée de fonds en cryptomonnaie.
Il peut s’agir de financer une nouvelle blockchain mais dans la plupart des cas il s’agit d’émettre un token ou de créer une application décentralisée basée sur une blockchain déjà existante comme Bitcoin, Ethereum ou NXT. » (source

Au début... la blockchain 

Ci-dessous, une excellente vidéo explicative à propos de La Blockchain :

Du côté d'AppInMail : l'intégration de l'usage de la Blockchain dans les échanges d'email EAC faisait partie dès l'origine de la conception du système d'eApp (un article est bientôt disponible pour expliquer ce que sont les eApp)

On vous en avait parlé ici (l'article date de mars 2016) :

Plus tard c'est  la Blockchain d' Ethereum  (  qui a retenu toute notre attention,  la plus adaptée car Ethereum utilise une Blockchain qui est faite pour AppInMail.
Ethereum utilise en plus des smart contracts,  les dApp, et Nicolas Korboulewsky (Co-fondateur d'AppInMail) nous dit que "(...)pour faire simple c'est un petit programme, coté serveur, dont le code est inchangeable et dont les données sont stockées de façon certaines et infalsifiables dans la Blockchain.
(...)Comme la plupart des applications, le Backend (logiciel serveur) ne suffit pas, il faut aussi un Frontend : Interface utilisateur.
Ethereum a inventé la Blockchain qui permet de créer un Backend décentralisé et AppInMail a créer la façon d'intégrer le Front End dans un email ! L'email en technologie EAC."

Alors pourquoi une ICO ?

Pour Nicolas Korboulewsky, "c'est pour cette raison que je pense qu'une ICO est parfaitement adaptée à AppInMail et je dirais même que ça fait partie de ses gênes primordiaux, l’intégration de la blockchain a toujours fait partie du projet, cependant Ethereum est la technologie qui le rend possible. (...)
Les avantages sont très importants par rapport à une opération de type IPO :
- Une ICO est gérée par la Blockchain, ce qui garantit une exécution inaltérable du processus.
- L’émission de la monnaie, à savoir les Tokens, ne diluent pas les actionnaires.
- L’émission est internationale et peut générer des flux très importants (comme pour
- Il n'y a pas de contrainte de régulation.
- Ce qui compte c'est le projet avant tout !

Il faut bien comprendre qu'il y a exactement en ce moment une folie ICO et comme toujours, il y a à boire et à manger dans tout ce qui est dit. Les dernières grosses levées se comptent en centaines de millions de $ !!! Largement au-dessus de la valeur réelle des projets. "

Des chroniqueurs de BFM vous expliquent  :
Et d'après eux "les ICO se font parfois sur une simple idée". Or de notre coté, contrairement à la quasi totalité des ICO, la technologie sous-jacente (EAC) n'est pas un concept en devenir, elle existe et est mise en oeuvre.

Créer une nouvelle économie digitale

Création de Tokens

Nous visons à construire un réseau socio-économique de nouvelle génération qui permet à tous, grâce à un email, de participer en toute simplicité au monde digital et de gérer en toute autonomie, son identité numérique.
Le jeton du réseau AppInMail ('ANT' pour Appinmail Network Token) est un jeton d'utilité ERC-20 qui alimentera le réseau AppInMail dans ses échanges de biens et de services. ANT est le moteur d’économie d'AppInMail.

La bourse de talents 

Notre plus grande ambition au travers de cette ICO, est de créer une nouvelle économie digitale.
Les Start-Ups qui souhaitent développer leur propre business en utilisant la technologie EAC pourront développer des eApps innovantes (un article est bientôt disponible pour expliquer ce que sont les eApp), seront financées via des TOKENS ANT. Ce financement servira à payer les produits et services dont ils ont besoin (comme les développeurs, les graphistes, les avocats, etc.) faisant partie de l'écosystème AppInMail. Une bourse de talents sera créée et mettra en relation les ressources et les projets. Une partie importante des TOKENS de l'ICO sera investie dans cette nouvelle économie.

Cette ICO va financer les meilleurs projets utilisant notre technologie.

Vous trouverez ces informations et bien d'autres complément sur le site AppinMail ICO :

Inscrivez-vous :
C'est le premier Email Communautaire, là ou tout commence, en cliquant sur "Démarrer l'aventure" vous pourrez :
- connaitre l'histoire d'AppinMail
- tester la technologie
- obtenir vos premiers points pour gagner les premiers ANT, et devenir le "Commandant de mission", le plus haut grade du jeu, rien qu'en invitant vos amis !

Technologie "Developer friendly"

Le contenu d’un email en technologie EAC (Email Active Content) a les mêmes capacités fonctionnelles qu’un site Web et permet donc la création de véritables applications dans l’email que l’on nomme des eApps.

Les eApps : les atouts de la technologie EAC

Parmi les eApps déjà disponibles, on peut citer l’eApp Anti-Spy, dans le mail communautaire Mission AppInMail, qui permet d’envoyer un message sécurisé dont le contenu est illisible pour les serveurs de messageries comme Gmail (protection de la vie privée) et dont la durée de vie est limitée.

Une autre eApp, BookMe (bientôt disponible), permet d’envoyer des emails de planification de rendez-vous avec différents interlocuteurs en partageant ses disponibilités dans un email dynamique sous la forme d’un calendrier cliquable toujours à jour.


Bien d'autres eApps vont être développées ! Le seul frein ? Votre imagination !

AppInMail et sa technologie EAC sont ouverts aux développeurs, aux start-up qui souhaitent façonner leur propre version de l'email 3.0. Et grâce aux eApps, nous les aideront, et nous financeront les meilleurs projets utilisant notre technologie.
Voici de quoi s'amuser lorsqu'on est développeur tout est désormais Open Source :

Une bourse de talents sera même créée et mettra en relation les ressources et les projets.

Venez tester l'email 3.0 inscrivez vous ici :

Failles de sécurités dans les Emails actuels - Les solutions apportées par la technologie EAC.

Les failles de l'email actuel La nécessité d'avoir des emails plus dynamiques et plus en adéquation avec les usages actuels ...