Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-11541

Transform Mail features into an extension



    • Improvement
    • Resolution: Fixed
    • Major
    • 6.4-milestone-2
    • 6.3
    • Mail
    • None
    • Unit, Integration
    • Unknown
    • N/A


      The idea is to move all the mail-related features into the xwiki-platform-mail module.


      • Separation of concerns
      • Extensibility: Ability to extend the mail feature with additional features (for example adding a default BCC field, see XWIKI-10789)

      Specifically this means:

      • Moving configuration currently located in XWikiPreferences into a MailConfig page
      • Moving Admin UI for Mail features into xwiki-platform-mail-ui / xwiki-platform-mail-send-ui modules
      • Handle backward compatibility


      • Remove xproperties from XWikiPreferences + remove custom mapping props related to mail from xwiki.hbm.xml (there are 2: "smtp_server" and "admin_email")
        • Use a database migration to copy the values ("smtp_server" and "admin_email" columns) from the mapped XWikiPreferences table (xwikipreferences) to the standard xproperties tables. Remove the 2 columns.
        • Use a listener that listens to Extension installed event (ExtensionInstalledEvent) and move the properties located in xproperties for the XWikiPreferences document to the new MailConfig xproperties, and then remove the xproperties from XWikiPreferences xclass and xobjects.
        • Modify the old mail sender plugin to use the new xproperties through the MailConfiguration (itself through the mail script service)
      • Remove from XWikiPreferencesDocumentInitializer
        • This is not core IMO and it's not required to always ensure there are mail xproperties in the wiki even if the Mail UI is not installed
      • Modify WatchListNotifier to use $services.mailsender.configuration and ideally move to use the new mailsender api
      • Modify shareinline.vm to use $services.mailsender.configuration and ideally move to use the new mailsender api
      • new mail-ui module with MailConfig page
        • Decide if we want 2 modules: one for the Admin email property + the obfuscation one and one for the Mail Sending properties. Or just one, in this case probably we would have a single page to display everything: general properties, sending properties + mail sending statuses
        • Decide if we need 2 mail address properties or just one. Right now we have a "admin_email" one which is used as the from address when sending. We could have 2: one admin email + one "from" address for mail sending which would default to the admin email one if not specified.
      • Remove XWiki.AdminEmailSheet page
      • Edit XWiki.AdminSheet page to remove the mail section
      • Check with Thomas if it's possible (or if we could implement it) for a module to contribute some template. Right now the mail displayer is in displayer_email.vm located in the platform-web module and it would be good to have it in some platform-mail module instead.


        Issue Links



              vmassol Vincent Massol
              vmassol Vincent Massol
              0 Vote for this issue
              2 Start watching this issue