Openstad
  • Introductie
  • Projectmanagement
    • Algemene kaders
    • Participatieprocessen
      • Voorkeurspeiling
      • Wedstrijd
      • Participatief begroten
  • Digitale tools
    • OpenStad CMS basis
      • Inloggen
      • De bouwstenen
      • Live in-page editing
      • Bewerkmodus (Draft)
      • Versiebeheer
    • Participatieprocessen
      • Voorkeurspeiling
      • Wedstrijd
      • Participatief begroten
    • How-to's
      • Nieuwe site aanmaken
      • Nieuwe pagina's toevoegen
      • Pagina's vullen
      • Inzendingen uploaden
      • Inzendingen weergeven
      • Filteren en categoriseren van inzendingen
      • Likes verzamelen
      • Reacties en argumenten
      • Interactieve kaart
      • Polygonen
      • Newsletter
      • Moderatie
      • Unieke stemcodes
      • Stemmen
      • Gebruikersbeheer
      • Gebruikers anonimiseren per website
      • Inzendingen exporteren en importeren
      • Vormgeving & logo aanpassen
      • E-mail notificaties
    • Widgets referentie
      • Accordeon
      • Agenda
      • Arguments
      • Columns
      • Slider
      • Counter
      • Date countdown bar
      • Ideas map
      • Ideeën op een kaart (Kaart applicatie)
      • iFrame
      • Image
      • Info bar
      • Link or button
      • List
      • Like
      • Location
      • Participatory budgeting
      • Keuzewijzer
      • Keuzewijzer resultaten
      • Rich text
      • Resource admin buttons
      • Resource overview
      • Resource form
      • Resource representation
      • Resource raw widget
      • Resource image
      • Speech bubble
      • Share widgets
      • Title
      • User remove form
      • Video upload
      • Video 3d party
      • Vorige volgende knoppen
    • Algemeen
      • Terminologie
      • Waarschuwingen
      • Adminpanel
      • Adminpanel (beta)/React admin
      • Page Settings
      • OpenStad hoofdmenu
        • Tags
        • Global
        • Open palette
        • Clear cache
        • Pages
        • Users
        • Images
        • Files
        • Workflow
        • Logout
      • Styles for the container
      • Interactieve kaart thema iconen
      • Inzendingen (ideas)
      • Artikelen (articles)
      • Gebruikers (users)
      • Authenticatie methodes
      • Rollen
      • URL's
      • Testen
      • Raw
      • Resources
  • Technical documentation (English)
    • Architecture
    • Getting started
    • Deploying to production
      • Kubernetes
      • Installing on Digital ocean with Kubernetes
      • Backups
      • Deploying a custom image
    • Frontend: CMS
      • Apostrophe CMS
      • The Openstad version of ApostropheCMS
      • Using openstad-components
      • Configuration
    • Frontend: Components
      • Use and configuration
      • Publishing
      • Components
        • Choices Guide
        • Ideas On Map
    • Api
      • Site
      • Idea
      • Argument
      • Vote
      • Article
      • Newsletter Signup
      • User
      • Auth
      • Resource & Data permissions
      • Pagination and search
      • Email settings
      • Database migrations
      • API configuration
    • oAuth2
      • Oauth2 configuration
    • Management panel
      • Management Panel configuration
    • Image server
    • Contributing & versioning
    • Git flow
    • Roadmap
Powered by GitBook
On this page
  • Confirmation after submitting an Idea or Article
  • Notifications to Moderators
  1. Technical documentation (English)
  2. Api

Email settings

The API sends a few type of e-mails.

Confirmation after submitting an Idea or Article

After submitting an idea or an article an automatic Thank you e-mail is send to the user that submitted it.

By default this is a generic e-mail template. This can be customised per site in the config field of the Site model.

{
  "config": {
    "cms": {
      "url": "URL VAN DE WEBSITE"
    },
    "ideas": {
      "feedbackEmail": {
        "from": "NAAM <EMAIL@ADDRESS>",
        "subject": "ONDERWERP",
        "inzendingPath": "/PATH/NAAR/INGEDIEND/PLAN/[[ideaId]]",
        "template": "Beste {{user.fullName | default('indiener')}},<br/><br/>Bedankt voor je <a href=\"{{inzendingURL}}\">inzending</a>.<br/><br/>Groeten van het Project Team"
      }
    }
  }
}

Template uses the nunjucks templating engine, the following variables are available in the template:

  • user: user object that created the Idea (see rest API for properties)

  • idea: newly created Idea object (see rest API for properties)

  • HOSTNAME: Hostname url of the site, same as site.config.cms.hostname

  • SITENAME: Name of the site, same as site.title

  • URL: URL of the site, sames as site.config.cms.url,

  • EMAIL: from adres (email only),

  • inzendingURL: The url leading to the path, warning path should be set correctly in the config since CMS can change the page: site.config.cms.url + site.config.ideas.feedbackEmail.inzendingPath.replace(/[[ideaId]]/, idea.id),

Notifications to Moderators

Notifications can be send to moderators to let them know if ideas and arguments have been created or edited on their site.

The e-mail template is also configurable per site:

{
  "config": {
    "notifications": {
      "from": "NAAM <EMAIL@ADDRESS>",
      "to": "NAAM <EMAIL@ADDRESS>",
      "inzendingPath": "/PATH/NAAR/INGEDIEND/PLAN/[[ideaId]]",
      "template": "<div data-gb-custom-block data-tag="if"><div data-gb-custom-block data-tag="for">{{idea.title}}</div></div><div data-gb-custom-block data-tag="if"><div data-gb-custom-block data-tag="for">{{arg.description | nl2br | safe}}</div></div>",
        "attachments": [{ filename: "FILENAME1", "cid": "CID1" }, { filename: "FILENAME2", "cid": "CID2" }]
    }
  }
}

The notifications are bundles and send periodically so arguments and ideas are an array.

Template uses the nunjucks templating engine, the following variables are available in the template.

  • data.idea: an array van idea objecten, met de user included, en een

  • inzendingURL per idea

  • data.argument: een array van argument objecten, met de user en idea included

  • HOSTNAME: Hostname url of the site, same as site.config.cms.hostname

  • SITENAME: Name of the site, same as site.title

  • URL: URL of the site, sames as site.config.cms.url

PreviousPagination and searchNextDatabase migrations

Last updated 3 years ago