add hire/resume pages, contact form, security middleware, and admin improvements

This commit is contained in:
Blake Ridgway
2026-03-08 21:36:47 -05:00
parent c916186d78
commit 261745a5b7
22 changed files with 1237 additions and 72 deletions

18
internal/mailer/mailer.go Normal file
View File

@@ -0,0 +1,18 @@
// Package mailer sends email via the local SMTP relay (OpenSMTPD on localhost:25).
package mailer
import (
"fmt"
"net/smtp"
)
const from = "noreply@ridgwaysystems.org"
// Send delivers a plain-text email through the local MTA.
func Send(to, subject, body string) error {
msg := fmt.Sprintf(
"From: %s\r\nTo: %s\r\nSubject: %s\r\nMIME-Version: 1.0\r\nContent-Type: text/plain; charset=utf-8\r\n\r\n%s",
from, to, subject, body,
)
return smtp.SendMail("localhost:25", nil, from, []string{to}, []byte(msg))
}