.. include:: /Includes.rst.txt .. _feature-1791376979: ========================== Feature: Mail to employees ========================== Description =========== HR writes to up to 500 employees with ``POST /api/v1/employee-mails``. Each mail goes to the work address through the notification type ``employee.hrMessage``, which is e-mail only and cannot be switched off, with the placeholders ``{firstName}``, ``{lastName}``, ``{displayName}``, ``{position}`` and ``{department}`` filled for each recipient. People who left are refused one by one; someone without an account is logged as failed. HR and the employee read the mail log with ``GET /api/v1/employees/{id}/mails``, with the delivery state of each mail. A notification type may now be mandatory (``NotificationTypeDefinition::$mandatory``), and a notice may name the address its e-mail goes to (``EmailDelivery::RECIPIENT_ADDRESS``). ``DeliveryStates`` tells other modules where the e-mails about their subjects stand. Impact ====== Run the database migrations. .. index:: Backend, Database, API, package:adsum-core