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
Company
Defined using the hCard microformat.
Example
Event
Any event, such as a concert, exhibition, birthday or sale. Defined using the hCalendar microformat.
Example
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
Expanded example
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
Expanded example
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
Expanded example
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
Extended example
А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
Extended example
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
Expanded example
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
Extended example
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
More developed example (using hCard for marking the sender)
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
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
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