emails

package module
v0.1.0 Latest Latest
Warning

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

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

README

Emails(ender)

A simple but useful email sender wrapper via SMTP protocol.

Installation

go get -u github.com/collatzc/emails

Quick Start

mailSender, err := NewMailSender("smtphost", 587, "SenderName", "senderDisplayEmail", "accountEmail", "accountPassword")
if err != nil {
	log.Fatal("Unexpected err", err)
}

mailSender.SendMail([]string{"recipientEmail"}, "subject", "content")

License

The MIT License (MIT)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MailSender

type MailSender struct {
	Identity  string
	Host      string
	Port      int
	FromName  string
	FromEmail string
	Username  string
	Password  string
	// contains filtered or unexported fields
}

func NewMailSender

func NewMailSender(host string, port int, fromname, fromemail, username, password string) (*MailSender, error)

func (*MailSender) SendMail

func (ms *MailSender) SendMail(to []string, subject, msg string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL