Versions in this module Expand all Collapse all v3 v3.0.1 Feb 2, 2022 Changes in this version + const EncodingBase64 + const EncodingNone + const EncodingQuotedPrintable + const PriorityHigh + const PriorityLow + const TextCalendar + const TextHTML + const TextPlain + func SendMessage(from string, recipients []string, msg string, client *SMTPClient) error + type AuthType int + const AuthCRAMMD5 + const AuthLogin + const AuthNone + const AuthPlain + type Email struct + Charset string + DkimMsg string + Encoding encoding + Error error + SMTPServer *smtpClient + func NewMSG() *Email + func (email *Email) AddAddresses(header string, addresses ...string) *Email + func (email *Email) AddAlternative(contentType contentType, body string) *Email + func (email *Email) AddAlternativeData(contentType contentType, body []byte) *Email + func (email *Email) AddAttachment(file string, name ...string) *Email + func (email *Email) AddAttachmentBase64(b64File, name string) *Email + func (email *Email) AddAttachmentData(data []byte, filename, mimeType string) *Email + func (email *Email) AddBcc(addresses ...string) *Email + func (email *Email) AddCc(addresses ...string) *Email + func (email *Email) AddHeader(header string, values ...string) *Email + func (email *Email) AddHeaders(headers textproto.MIMEHeader) *Email + func (email *Email) AddInline(file string, name ...string) *Email + func (email *Email) AddInlineBase64(b64File, name, mimeType string) *Email + func (email *Email) AddInlineData(data []byte, filename, mimeType string) *Email + func (email *Email) AddTo(addresses ...string) *Email + func (email *Email) Attach(file *File) *Email + func (email *Email) GetError() error + func (email *Email) GetFrom() string + func (email *Email) GetMessage() string + func (email *Email) GetRecipients() []string + func (email *Email) Send(client *SMTPClient) error + func (email *Email) SendEnvelopeFrom(from string, client *SMTPClient) error + func (email *Email) SetBody(contentType contentType, body string) *Email + func (email *Email) SetBodyData(contentType contentType, body []byte) *Email + func (email *Email) SetDate(dateTime string) *Email + func (email *Email) SetDkim(options dkim.SigOptions) *Email + func (email *Email) SetFrom(address string) *Email + func (email *Email) SetListUnsubscribe(address string) *Email + func (email *Email) SetPriority(priority priority) *Email + func (email *Email) SetReplyTo(address string) *Email + func (email *Email) SetReturnPath(address string) *Email + func (email *Email) SetSender(address string) *Email + func (email *Email) SetSubject(subject string) *Email + type Encryption int + const EncryptionNone + const EncryptionSSL + const EncryptionSSLTLS + const EncryptionSTARTTLS + const EncryptionTLS + func (encryption Encryption) String() string + type File struct + B64Data string + Data []byte + FilePath string + Inline bool + MimeType string + Name string + type SMTPClient struct + Client *smtpClient + KeepAlive bool + SendTimeout time.Duration + func (smtpClient *SMTPClient) Close() error + func (smtpClient *SMTPClient) Noop() error + func (smtpClient *SMTPClient) Quit() error + func (smtpClient *SMTPClient) Reset() error + type SMTPServer struct + Authentication AuthType + ConnectTimeout time.Duration + Encryption Encryption + Helo string + Host string + KeepAlive bool + Password string + Port int + SendTimeout time.Duration + TLSConfig *tls.Config + Username string + func NewSMTPClient() *SMTPServer + func (server *SMTPServer) Connect() (*SMTPClient, error) + func (server *SMTPServer) GetEncryptionType() Encryption Other modules containing this package github.com/manawasp/go-simple-mail