Misc. fixes (#267)

* Misc. fixes

- Do not expose 'username' to a potential recipient.
- Make 'from' mandatory, because there is no fallback anymore.
- Validate 'from' to make shure, it contains an email address.
- Avoid namespace pollution: Use let instead of var.

* Suggested changes from codereview
This commit is contained in:
Fritz Elfert
2026-03-10 10:08:10 +01:00
committed by GitHub
parent e035119249
commit 41125078ce
3 changed files with 13 additions and 14 deletions

View File

@@ -39,10 +39,11 @@ Some features:
password: ${{secrets.MAIL_PASSWORD}}
# Required mail subject:
subject: Github Actions job result
# Required recipients' addresses:
# Optional recipients' addresses:
to: obiwan@example.com,yoda@example.com
# Required sender full name (address can be skipped):
from: Luke Skywalker # <user@example.com>
# Required sender (Either: "Plain Simple Name <user@doma.in>" or just "user@doma.in" (without the <>))
# Important: '<' and '>' are special chars in yaml. Therefore this string should be quoted
from: 'Luke Skywalker <user@example.com>'
# Optional plain body:
body: Build job of ${{github.repository}} completed successfully!
# Optional HTML body read from file: