Author: dunc_harris
Description
There should be an option to receive emails in either plain text or html format (note that Echo already has HTML email, this is for other emails).
Receiving emails in html format would allow the sender to use wiki markup to help convey his message across.
The standard core emails, i.e.
- email confirmation and password reset,
- enotiftalk,
- enotifwatchlist
would benefit from being available in HTML format as well.
An initial implementation
- keep the very same content
- and ideally reuse translations (split in multiple messages?);
- put links in a tags;
- ensure choice, between plain text and HTML, either a) client-side (when the plain text+HTML message is delivered), and/or b) server-side (configuration setting to decide default/only option), and/or c) user-side (preference somewhere).
Subsequent steps
- change defaults;
- add styling;
- augment content;
- allow other pieces of core and extensions to reuse standard parts for their own emails or to alter existing ones (this should preferably take into account that Echo has HTML email and figure out a way to reduce/avoid redundancy);
- deprecate overlapping features in other areas of the code.
Advantages
- [high] links which don't break, even in stupid clients unable to handle punctuation and even with long percent-encoded titles,
- [mid] choice and customisations,
- [minor] compactness,
- [debatable] prettyness.
Disadvantages (in case of inadequate implementation)
- preferences clutter,
- lack of support in clients,
- degradation of i18n for years until translations are re-added in all languages.
Current todos
- Finding a way to not have separate messages for plain-text and HTML, which is something I mentioned in one of the patches.
- There still needs to be a way to make templates for the emails, i.e., some sort of wrapper that the email content will be injected into.
- Then, of course, the actual graphic design of the templates themselves, including approval of the design by whoever would be relevant in WMF.
- Working on improving the content of other emails other than just page change notifications.
Implementation tips
Creating HTML emails that look good in common clients (which cripple the HTML in various ways) is a bit of a black art; you probably want to grab some sort of boilerplate (e.g. Zurb has some nice ones).
Some interesting stuff you can do with HTML email: T106651: Enrich Wikimedia email with Schema.org metadata
Internship project details
- Primary mentor: @Parent5446
- Co-mentor: @01tonythomas
- Other mentors: (optional, Phabricator username)
- Skills: (Phabricator tags are welcome)
- Estimated project time for a senior contributor: (must be 2-3 weeks)
- Microtasks: T48109, T31856, T62434