feat(04-03): register plugin mail layouts and publish the mailer at boot

- Map short layout names onto dotted layout files and wrap text/HTML
- party.Activate publishes postcard.Mailer before Boot and names missing files
- Hello plugin sends through the app-scoped mailer

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jakub Zych
2026-09-18 13:59:52 +02:00
parent b4fd8339fe
commit 1e515971c9
9 changed files with 251 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
subject = "Hello {{ .Name }}"
description = "English hello greeting"
layout = "default"
layout = "hello"
==
Hello **{{ .Name }}**.

View File

@@ -1,6 +1,6 @@
subject = "Witaj {{ .Name }}"
description = "Hello greeting"
layout = "default"
layout = "hello"
==
Witaj **{{ .Name }}**.

View File

@@ -0,0 +1,14 @@
name = "Hello"
==
-- {{ .Content }} --
==
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">{{ .brandCss }}{{ .css }}</style>
</head>
<body>
<div class="layout-hello">{{ .Content }}</div>
</body>
</html>