The common package includes essential utilities such as email validation, sanitization, MIME type determination, and structures for handling email messages and attachments
EmailMessage
: constructing and manipulating email messagesAttachment
: managing email attachments, including file handling and base64 encodingValidation
: validating email addresses and slices of email addressesSanitization
: sanitizing input to prevent injection attacks
package main
import (
"github.com/theopenlane/newman/shared"
)
func main() {
email := shared.NewEmailMessage("[email protected]", []string{"[email protected]"}, "Jumbaliyaaaaa", "Crease, crumple, cram. You'll do fine")
fmt.Println(email.GetSubject())
}