7ce8201082
Recurring email newsletter for webtrees 2.2+. Each enabled tree
sends upcoming birthdays of living individuals, optional marriage
anniversaries of intact couples, and a once-per-calendar-month
historical section of births and deaths of deceased individuals.
Triggered exclusively by an external scheduler (system cron,
systemd timer, etc.) hitting a token-gated HTTP endpoint — never
on visitor page loads. The "is it due?" decision is idempotent
within the configured frequency window.
Per-user subscription is integrated into the built-in
/my-account/{tree} page via a custom view + a decorated
AccountUpdate handler. Admins can add external addresses and
trigger an immediate send for testing. Email body renders in
German for German-language users; English otherwise. Birthdays
and anniversaries are formatted with the upcoming-event ordinal
age (e.g. "45th birthday" / "45. Geburtstag").
24 lines
509 B
PHP
24 lines
509 B
PHP
<?php
|
|
|
|
/**
|
|
* Email Newsletter module for webtrees.
|
|
*
|
|
* Sends recurring email newsletters with upcoming birthdays, marriage
|
|
* anniversaries, and historical events from the family tree.
|
|
*
|
|
* @license AGPL-3.0-or-later
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace EmailNewsletter;
|
|
|
|
use Composer\Autoload\ClassLoader;
|
|
use Fisharebest\Webtrees\Registry;
|
|
|
|
$loader = new ClassLoader();
|
|
$loader->addPsr4('EmailNewsletter\\', __DIR__ . '/src');
|
|
$loader->register();
|
|
|
|
return Registry::container()->get(Module::class);
|