Installation & profiles

imio.emailkit ships two profiles. One gives you the API; the other gives you the API and restyles Plone's own transactional mails. Almost everybody wants the second one.

Install

pip install imio.emailkit

Then install the add-on in Site Setup, or apply the profile directly.

The two profiles

ProfileInstallsUse it when
imio.emailkit:defaultthe runtime and the restyled Plone default mailsalmost always
imio.emailkit:basethe runtime only; stock Plone mails are untouchedyou want the API without the restyled defaults

:default extends :base, so installing it gives you both.

What :base installs

  • The three theme records under the imio.emailkit.theme prefix, built from IEmailkitTheme and seeded with that interface's own field defaults.

The runtime itself — render(), the Email builder, template discovery — needs no profile at all. It is available as soon as the egg is importable. The profile exists for the parts that are site state.

What :default adds

  • The IEmailkitLayer browser layer, which carries the z3c.jbot overrides of Plone's password-reset and registration mail templates and the overridden login-help view behind the username-reminder mail.
  • The Send styled email content-rule action. See Content-rule action.

Registering the layer is the whole mechanism: both the jbot directory and the login-help view are bound to IEmailkitLayer, so neither takes effect on a site where that layer is not installed. Uninstalling removes the layer and Plone's stock mails come back.

Behind a reverse proxy

Two of the restyled login-help mails — password reset and username reminder — tell the recipient which IP address the request came from. That value comes from Zope's request.getClientAddr(), which honours X-Forwarded-For only for proxies you have declared:

# zope.conf
trusted-proxy 127.0.0.1

Without it, HTTPRequest.trusted_proxies is empty and Zope reports the proxy's own address — so the mail says 127.0.0.1 instead of the real client. That is Zope behaving correctly, not a bug in this add-on.

Opting out

Install imio.emailkit:base instead of :default. You keep the API, the discovery and the kit; Plone's own mails are left exactly as they were.

PROFILE=base make create-site

That is the third of the three override levels. The other two — replacing markup per site, and adjusting branding only — are on Overrides & theming.

Requirements

  • Name
    Plone
    Type
    6.0, 6.1, 6.2
    Description

    Classic UI only. There is no Volto component and no REST endpoint, because these are emails.

  • Name
    Python
    Type
    3.10 – 3.13
    Description

    No Python-2 support and none planned.

  • Name
    Node.js
    Type
    22+, developers only
    Description

    Needed to build templates. Never needed to install, test or run the add-on.