Files
vantage/shared/mail/contact.go
T
mrhid6 a232c74990
Server Deploy / deploy (push) Successful in 2m46s
feat: Move mail system to shared
2026-07-28 09:50:46 +01:00

28 lines
673 B
Go

package mail
import "time"
// Enquiry is one submission of the public site's contact form.
type Enquiry struct {
Name string
Email string
Servers string
Topic string
Message string
}
// SendEnquiry forwards a contact-form submission to the support address.
//
// Reply-To is the sender's address, not From: the message is sent by our own
// SMTP identity so it passes SPF, but hitting reply must reach the person who
// filled the form in.
func (s Sender) SendEnquiry(to string, e Enquiry) error {
return s.sendTemplate(to, e.Email, "contact", struct {
Enquiry
Received string
}{
Enquiry: e,
Received: time.Now().UTC().Format(time.RFC1123),
})
}