pkorotkov / mailbox

Go library for easy sending international emails with attachments.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mailbox

Using mailbox library you can easily send full-fledged emails with little effort:

creds := mailbox.NewCredentials("smtp.gmail.com:587")
creds.SetPLAINAuth("my_login", "my_password")

mes := new(mailbox.Message)
mes.From("Pavel", "***@gmail.com").
	To("Dmitry", "***@gmail.com").
	To("Sergey", "***@gmail.com").
	Subject("Meet-up").
	Body("It's high time guys!")
if err := mes.Attach("Agenda.txt"); err != nil {
	log.Fatal(err)
}

if err := mailbox.SendMessage(creds, mes); err != nil {
	log.Fatal(err)
}

About

Go library for easy sending international emails with attachments.

License:MIT License


Languages

Language:Go 100.0%