Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

MailchainWeb Readme

FOSSA Status Build Status Coverage Status

Welcome to Mailchain

This repository contains the Mailchain Web Application that is powered by, built to the Mailchain specification.

About Mailchain

Extract from the Mailchain specification:


Mailchain enables blockchain-based email-like messaging with plain or rich text and attachment capabilities. Using blockchain protocols and decentralized storage, Mailchain delivers a simple, secure, messaging experience.

Account holders or owners of a public address often need to communicate in the context of the account or public address. Communication may relate to transactions, account actions or some type of notification.

Examples of use cases for blockchain messaging include invoicing, receipts, contacting users of a service or application developers.

The majority of blockchain protocols provide no standard way to handle messaging. Some account holders have sent messages as an encrypted or unencrypted string included in transaction data. Some applications work around the problem by asking users to link another method of contact (e.g. email address, phone number etc.) to an application. This compromises anonymity by asking users to link or reveal an identity. It also increases exposure to security risks, and relies on additional centralized services.

This proposal outlines how Mailchain gives users the ability to send and receive rich-media HTML messages between public addresses through a simple, email-like interface. All message contents and attachments are encrypted so only the intended recipient of the message can decrypt and view messages.

Mailchain Message Lifecycle

Mailchain is a simple, secure and practical standard which can be implemented across different blockchains. It uses underlying native blockchain protocol capabilities including addressing, immutability, data transmission, and cryptography.

The basic message flow is as follows:

  • A user sends a message. The message is encrypted and stored using the recipient’s public key so that only the recipient can locate and decrypt the message contents. The encrypted location of the message is sent by the sender to the recipient in the data field of a transaction.

  • To read a message, a recipient uses a corresponding private key to decrypt the location of the message from the data field of a transaction and decrypt the message contents.

Getting Started

  1. To use the Mailchain Web Application, you need to be running the mailchain application which contains the api and configuration for messaging.

  2. Then to use the mailchain web interface, either:

Address Formats

The following address formats are referenced:

Address Format Example Notes
Ethereum 0xd5ab4ce3605cd590db609b6b5c8901fdb2ef7fe6 Case insensitive
Mailchain <0xd5ab4ce3605cd590db609b6b5c8901fdb2ef7fe6@ropsten.ethereum> Case insensitive

URL and Port Settings

By default, the Mailchain web interface expects to communicate with the Mailchain application running on the localhost using port 8080.

To change this:

Change server settings on the Inbox page

  1. Click 'Settings' on the Inbox page
  2. Make any updates
  3. Click 'save'

Change server settings using url query parameters

It is possible to change the settings programatically using a url with params. For example, http://localhost:4200/#/?web-protocol=http&host=localhost&port=8080 will configure the Inbox to use: http to contact localhost on port 8080. The Inbox will set the values, then refresh the page.

Query Parameter Description
web-protocol The Internet protocol e.g. http or https
host The host e.g. localhost, or another host
port The port e.g. 8080

Browser Storage

The following values are cached in the browser session storage:

Key Value
currentNetwork: The current selected network (e.g. ropsten, mainnet)
currentAccount: The current selected account for this network
currentProtocol: The current selected blockchain protocol
currentWebProtocol: The current selected web protocol (e.g. https or http) for contacting the mailchain application
currentPort: The current selected port (e.g. 8080) for contacting the mailchain application
currentHost: The current selected host (e.g., localhost, etc.) for contacting the mailchain application

Message Storage

The Mailchain web application does not store message contents.

Development Info


node_js version 13

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.


Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Security Review Status: pre-audit

The code in this repository has not been audited.


FOSSA Status