Skip to content
/ email Public
forked from scorredoira/email

An easy way to send emails with attachments in Go

Notifications You must be signed in to change notification settings

s4uliu5/email

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

An easy way to send emails with attachments

Send attachments

m := email.NewMessage("Hi", "this is the body")
m.From = "[email protected]"
m.To = []string{"[email protected]"}

err := m.Attach("picture.png")
if err != nil {
	log.Println(err)
}

err = email.Send("smtp.gmail.com:587", smtp.PlainAuth("", "user", "password", "smtp.gmail.com"), m)

Send unencrypted password

err = email.SendUnencrypted("mail.example.com:25", "user", "password", m)

About

An easy way to send emails with attachments in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published