package infra // EmailBuildText constructs an EmailMessage with a plain text body. // to is a list of recipient addresses. // subject is the email subject line. // bodyText is the plain text content of the email. // Returns a new EmailMessage with no CC, BCC, attachments or custom headers. func EmailBuildText(from string, to []string, subject, bodyText string) EmailMessage { toSlice := make([]string, len(to)) copy(toSlice, to) return EmailMessage{ From: from, To: toSlice, Subject: subject, BodyText: bodyText, } }