Page MenuHomePhabricator

[GSoC] Minimum Viable Product (MVP) for Implementing HTML E-Mail support for MediaWiki
Open, Needs TriagePublic

Description

Features to be implemented in the MVP, for T130490

  • Implement very basic plain text to HTML conversions:
    • Use nl2br to convert newlines to <br/> tags
    • Include links in <a> tags. Account for links being in brackets (()), in quotes (‘’ or “”) and any other format that we find people tend to mention links in plain text.
  • In order to reduce redundancy and allowing extensions to reuse/alter their existing HTML email support, a new global $wgCoreHTMLEmail could be added to allow Wiki Administrators to send plain text emails if they want to (send plain text email if $wgCoreHTMLEmail is set to false, and send multipart email if it is true) , besides $wgAllowHTMLEmail, which decides whether the Wiki allows anybody (core or extension) to send an HTML Email. To explain the different cases more clearly,
    • if ($wgAllowHTMLEmail == false) only plain text emails go
    • if ($wgAllowHTMLEmail == true and $wgCoreHTMLEmail == false) Anybody *except core* can send an HTML email.
    • if ($wgAllowHTMLEmail == true and $wgCoreHTMLEmail == true) Everybody can and core *will* send an HTML email.
  • The server will send emails to the client depending upon user preferences:
    • The user will be given a “Receive plain text email only” option in Special:Preferences. When this is ticked, the server will send only plain text emails to that specific user.
    • When the above option is unticked, the server will send a multipart email (both HTML and plain text) when both $wgAllowHTMLEmail and $wgCoreHTMLEmail are set to true.
  • Translation: When generating a key to be passed to wfMessage(), it will be assumed that if the key does not end with -html, the text is wikitext/plaintext. If the caller of the function wishes to include html in the text, the key must be appended by -html.

Event Timeline

Change 291922 had a related patch set uploaded (by Galorefitz):
EmailNotification.php: Method for basic html transformations to emails

https://gerrit.wikimedia.org/r/291922

Change 293116 had a related patch set uploaded (by Galorefitz):
Get transformContenttoHTML() to accept i18n key

https://gerrit.wikimedia.org/r/293116

Change 294682 had a related patch set uploaded (by Galorefitz):
User preference for receiving plaintext emails only

https://gerrit.wikimedia.org/r/294682

Change 295131 had a related patch set uploaded (by Galorefitz):
Implement User Preference for Batch Emails

https://gerrit.wikimedia.org/r/295131

Change 303238 had a related patch set uploaded (by Galorefitz):
Implement multipart Email with basic HTML transformations

https://gerrit.wikimedia.org/r/303238

Change 305430 had a related patch set uploaded (by Galorefitz):
Added HTML Email template

https://gerrit.wikimedia.org/r/305430

Removing task assignee due to inactivity, as this open task has been assigned to the same person for more than two years (see the emails sent to the task assignee on Oct27 and Nov23). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.
(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)

Change 295131 abandoned by Thiemo Kreuz (WMDE):
[mediawiki/core@master] Implement User Preference for Batch Emails

Reason:
5 years old. User appears to be inactive. Please feel free to reopen this patch if I made a mistake.

https://gerrit.wikimedia.org/r/295131

Change 293116 abandoned by Thiemo Kreuz (WMDE):
[mediawiki/core@master] Get transformContenttoHTML() to accept i18n key

Reason:
5 years old. User appears to be inactive. Please feel free to reopen this patch if I made a mistake.

https://gerrit.wikimedia.org/r/293116

Change 303238 abandoned by Thiemo Kreuz (WMDE):
[mediawiki/core@master] Implement multipart Email with basic HTML transformations

Reason:
5 years old. User appears to be inactive. Please feel free to reopen this patch if I made a mistake.

https://gerrit.wikimedia.org/r/303238

Change 305430 abandoned by Thiemo Kreuz (WMDE):
[mediawiki/core@master] Added HTML Email template

Reason:
5 years old. User appears to be inactive. Please feel free to reopen this patch if I made a mistake.

https://gerrit.wikimedia.org/r/305430

Change 291922 abandoned by Thiemo Kreuz (WMDE):
[mediawiki/core@master] EmailNotification.php: Method for basic html transformations to emails

Reason:
5 years old. User appears to be inactive. Please feel free to reopen this patch if I made a mistake.

https://gerrit.wikimedia.org/r/291922

Change 294682 abandoned by Thiemo Kreuz (WMDE):
[mediawiki/core@master] User preference for receiving plaintext emails only

Reason:
5 years old. User appears to be inactive. Please feel free to reopen this patch if I made a mistake.

https://gerrit.wikimedia.org/r/294682