{"modulePath":"github.com/RedAFD/code-core","version":"v1.8.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package mailer\n\n## Variables\n\n```go\nvar Sender gomail.Sender\n```\nSender sender for sending mail synchronously\n\n## Functions\n\n```go\nfunc LoginAuth(username, password string) smtp.Auth\n```\nLoginAuth SMTP AUTH LOGIN Auth Handler\n\n```go\nfunc NewContext()\n```\nNewContext start mail queue service\n\n```go\nfunc SendAsync(msg *Message)\n```\nSendAsync send mail asynchronous\n\n## Types\n\n```go\ntype Message struct {\n\tInfo string // Message information for log purpose.\n\t*gomail.Message\n}\n```\nMessage mail body and log info\n\n```go\nfunc NewMessage(to []string, subject, body string) *Message\n```\nNewMessage creates new mail message object with default From header.\n\n```go\nfunc NewMessageFrom(to []string, fromDisplayName, fromAddress, subject, body string) *Message\n```\nNewMessageFrom creates new mail message object with custom From header.\n\n","path":"github.com/RedAFD/code-core/modules/mailer","name":"mailer","synopsis":"","isRedistributable":true}
