package module
Version: v0.3.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2021 License: MIT Imports: 5 Imported by: 0


mcmail |

  • Send Email / Messages Package
  • See test file(s) for test cases / scenarios




This section is empty.


This section is empty.


This section is empty.


type EmailConfigType

type EmailConfigType struct {
	Username  string `json:"username"`
	Password  string `json:"password"`
	Port      int    `json:"port"`
	ServerUrl string `json:"serverUrl"`
	MsgFrom   string `json:"msgFrom"`
	ApiKey    string `json:"apiKey"`
	Tls       string `json:"tls"`

func (EmailConfigType) SendEmail

func (mailer EmailConfigType) SendEmail(recipients []string, message string, subject string, emailType string) mcresponse.ResponseMessage

SendEmail sends text and html messages, attachment etc.

func (EmailConfigType) SendTextEmail

func (mailer EmailConfigType) SendTextEmail(recipients []string, message string) mcresponse.ResponseMessage

SendTextEmail method sends simple email messages to multiple recipients The message parameter should be an RFC 822-style email with headers first, a blank line, and then the message body. The lines of msg should be CRLF terminated. The msg headers should usually include fields such as "From", "To", "Subject", and "Cc". Sending "Bcc" messages is accomplished by including an email address in the to parameter but not including it in the msg headers. The SendMail function and the net/smtp package are low-level mechanisms and provide no support for DKIM signing, MIME attachments (see the mime/multipart package), or other mail functionality. Higher-level packages exist outside of the standard library

type EmailFunc

type EmailFunc func(props EmailPropsType) interface{}

type EmailPropsType

type EmailPropsType map[string]interface{}

type EmailSubjectFunc

type EmailSubjectFunc func(props EmailPropsType) string

type EmailTemplateType

type EmailTemplateType struct {
	Subject EmailSubjectFunc
	Text    EmailFunc
	Html    EmailFunc

type MessageObject

type MessageObject map[string]string

type TemplateDataType

type TemplateDataType map[string]interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL