smtp

package module
v0.0.0-...-cf81422 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: MIT Imports: 4 Imported by: 2

README

SMTP

Basic golang package to send basic (i.e. text only) emails.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	From string
	To   string
	Data string
}

func NewEmail

func NewEmail(from, to, subject, body string) (*Email, error)

NewEmail returns an Email instance.

type SMTP

type SMTP struct {
	Addr  string
	Hello string
}

func New

func New(addr, hello string) *SMTP

New returns an SMTP instance.

func (*SMTP) SendEmail

func (s *SMTP) SendEmail(e *Email) error

SendEmail is used to send an email through the s server.

Jump to

Keyboard shortcuts

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