Introduction

The Open Mail Format allows notifications to be tagged so that automated agents (electronic mail services) can provide users with custom information based on the content of the email.

OMF is based on the principle of microformats, which allow both humans and software to interpret the information encoded in the email.

OMF can be used to distinguish the semantic part of an email or for tagging any other message or page so that it can be filtered or grouped.

Description of Format

The root element must have a “notification” class.

Types of Notification

The root element’s microformat must have a class, corresponding to the type of action (see below for types). All of the microformat’s remaining elements must contain an internal element with this class.

A type may not be indicated for cases where there is corresponding type for notification.

General Properties

The microformat accepts the following properties:

  • actor (previously “from”) — generator; item producing an action communicated in the notification; person by default, if it is not obviously stated — notification recipient
  • object — item upon which an action is effected; person by default, if it is not obviously stated — notification recipient
  • text — short manually composed text with notification content
  • action-link — an action link, there may be several in the notification, suitable only for element <a>
  • attachment — an image linked to an action concerning notification. Be aware that a sender’s photo in a message is best defined in the “actor” property using the hCard microformat, suitable only for element <img>

All of these properties are optional, but more complete information provides a better view. The given meaning of a property is defined dependant on the type of notification.

Only text contains properties.

Classes of Action-links

Links may have additional classes which give them a meaning. This may be used, for example in limited area conditions (list view) where there remains only one most important action link. They are not compulsory for indication, but can improve the view and user experience. If additional classes are not indicated, the first according to the link text is considered the base.

Notification Model

It is implied in this specification that notification describes a type of action. One notification contains one action. The action is described by the following fields: type of action, generator (see types of entity), object of action (see types of entity), links, time of action (time of notification generation), source (the service which generated the notification).

Тypes of Entity

Possible meanings for an object of action and its generator are defined by type of action from the list of actions.

Person

Defined using the hCard microformat.

Example

<span class="vcard"><img class="photo" src="http://avt2.imgsmail.ru/corp/terekhov/_avatar" alt="" />
<a class="url fn" href="http://my.mail.ru/corp/terekhov/">Aleksey Terekhov</a>
</span>

Company

Defined using the hCard microformat.

Example

<span class="vcard">
<a class="org url fn" href="http://example.com/">Company “Horns and Hooves”</a>
</span>

Event

Any event, such as a concert, exhibition, birthday or sale. Defined using the hCalendar microformat.

Example

<span class="vevent">
<span class="summary">Pink elephant sale</span> will be held from
<span class="dtstart" title="2010-07-01">1st June</span> to
<span class="dtend" title="2010-08-01">1st August</span>
at address <span class="location">, 13 Krasnikh Bogatirey street, Moscow</span>.
</span>

Group

Group or community on the site.

Parent class — group; if it does not contain the included elements, this content defines the name.

Additional elements

class description source of data
name name
url address href
photo url logo img src, href
icon url icon img src, href

Simple example

<span class="group">Теst group</span>

Expanded example

<span class="group">
<img class="icon" src="http://example.com/favicon.ico" alt="" />
<img class="photo" src="http://example.com/logo.gif" alt="" />
<a class="url name" href="http://example.com/">Теst group</a>
</span>

Service

Web service, blog, social application or similar entity.

Parent class — service; if it does not contain the included elements, this content defines the name.

Additional elements

class description source of data
name name
url address href
photo url of logo img src, href
icon url of icon img src, href

Simple example

<span class="service">Techcrunch</span>

Expanded example

<span class="service">
<img class="icon" src="http://example.com/favicon.ico" alt="" />
<img class="photo" src="http://example.com/logo.gif" alt="" />
<a class="url name" href="http://example.com/">Тechcrunch</a>
</span>

Product

Commercial product or service.

Parent class — product; if it does not contain the included elements, this content defines the name.

Additional elements

class description source of data
name name
url address href
photo url of picture img src, href

Simple example

<span class="product">Bubblegum</span>

Expanded example

<span class="product">
<img class="photo" src="http://example.com/logo.gif" alt="" />
<a class="url name" href="http://example.com/">Bubblegum</a>
</span>

Articles

Blog posts, news articles or similar items.

Parent class — article; if it does not contain the included elements, this content defines the name.

Additional elements

class description source of data
name name
summary summary
url address href
photo url accompanying image img src, href

Simple example

<span class="article">How to stop worrying and start living?</span>

Extended example

<span class="article">
<img class="photo" src="http://example.com/image.gif" alt="" />
<a class="url name" href="http://example.com/article.html">How to stop worrying and start living?</a>
<span class="summary">In this article we reveal the secret of eternal happiness and long life.</span>
</span>

Аudio

Audio files: music, podcasts, audio books etc.

Parent class — audio; if it does not contain the included elements, this content defines the name.

Additional elements

class description source of data
name name
description description
url Address of the file, stream or page with player href

Simple example

<span class="audio">Phoenix — Lisztomania</span>

Extended example

<span class="audio">
<a class="url name" href="http://example.com/phoenix.mp3">Phoenix — Lisztomania</a>
</span>

Video

Parent class — video; if it does not contain the included elements, this content defines the name.

Additional elements

class description source of data
name name
description description
photo picture preview img src, href
url address of file, stream or page with player href

Simple example

<span class="video">cut kittenz</span>

Expanded example

<span class="audio">
<a class="url name" href="http://example.com/kittenz.mp4">cut kittenz</a>
</span>

Photo

Parent class — photo; if it does not contain the included elements, this content defines the name.

Additional elements

class description source of data
name name
description description
photo picture preview img src, href
url Address of full picture or page containing it href

Simple example

<span class="photo">cut kittenz</span>

Extended example

<span class="photo">
<a class="url name" href="http://example.com/kittenz.jpg">cut kittenz</a>
</span>

Types of Action

New Personal Message

Class — new-message. Possible types of generator: person. Possible types of action object: person.

Additional classes for action-links:

  • read-link: link through which you can read a message
  • reply-link: link through which you can reply to a message

Basic message example

<div class="new-message notification">
Hello, Dmitry Bitman!
<span class="text">On Moi Mir@Mail.Ru
<span class="actor">Aleksey Terekhov</span> has sent you a new personal message.</span>
<a class="action-link read-link" href="http://my.mail.ru/my/dialogues?thread=terekhov@corp.mail.ru">Read the message</a>.
</div>

More developed example (using hCard for marking the sender)

<div class="new-message notification">
Hello, Dmitry Bitman!
<span class="text">On the site Moi Mir@Mail.Ru
<span class="actor vcard">
<img class="photo" src="http://avt2.imgsmail.ru/corp/terekhov/_avatar" />
<a class="url fn" href="http://my.mail.ru/corp/terekhov/">Aleksey Terekhov </a>
</span>
has sent you a new personal message.</span> <a class="action-link read-link" href="http://my.mail.ru/my/dialogues? thread=terekhov@corp.mail.ru">Read</a>.
</div>

Note how from and vcard are combined in one element. Also, although URL and fn are in the same element, the URL will be from the href link, and the fn from its text.

Friendship Requests

Pending friend requests

Class — friendship-request. Possible types of generator: person. Possible types of object of action: person.

Additional classes for action-links:

  • accept-link: link to accept a pending request
  • reject-link: link to reject a pending request

Basic mail example

<div class="friendship-request notification">
Dmitry Bitman!
<span class="text"><span class="actor">Aleksey Terekhov</span> sent you friend request on Moi Mir@Mail.ru project. One you are friends with Alexey you will always be in touch and will receive additional opportunities for communication.</span> <a class="action-link" href="http://my.mail.ru/my/friends_requests?from_letter=friendship_request">Accept or reject</a> request. </div>

Invitation

Invitation to a group, application, site or event.

Class — invitation. Possible types of generator: person, group, service, company. Possible types of object of action: service, group, event.

Additional classes for action-links:

  • accept-link: link to accept an invitation

Minimal mail example

<div class="notification invitation">
Dmitry Bitman!
<span class="text"><span class="actor">Aleksey Terekhov</span> invites you to register on the site <span class="object service"><a class="name url" href="http://example.com">example.com</a></span>.</span>
<a class="action-link" href="http://example.com/registration">Accept invitation</a>.
</div>

New Content

New content: blog posts, photographs, video, shop products etc.

Class — post. Possible types of generator: person, group, service, company. Possible types of object of action: service, group, event, product, article, audio, video, photo, person, company.

New Rating

New rating for a type of content, tagged as for any item.

Class — new_mark. Possible types of generator: person. Possible types of object of action: service, group, event, product, article, audio, video, photo, person, company.

Sale

Notification of sale of a product.

Class — purchase. No generator. Possible types of object of action: product.

Notification of Period of Expiration

Notification of expiration for a for service expiry date.

Class — expiration. No generator. Possible types of action object: product.

Confirmation

Notification of an action that requires a confirmation from a user: registration, product order, subscription

Class — verification. Possible types of generator: service, group. No action object.

Additional classes for action-links:

  • accept-link: link to confirm

Required mail example

<div class="notification verification">
Dmitry Bitman!
<span class="text">You have registered on the site <span class="actor service"><a class="name url" href="http://example.com/">example.com</a></span>.</span>
<a class="action-link accept-link" href="http://example.com/registration/confirmation">Confirm registration</a>.
</div>