# README
doulivery-go
Installation
Use go get.
go get github.com/cloudoti/doulivery-go
Then import the validator package into your own code.
import "github.com/cloudoti/doulivery-go"
Usage and documentation
Send email without files
client := CreateClient("app_id", "key", "secret")
//Here, you can use GMAIL or MAILGUN
mailer := CreateMailer(client, "GMAIL").
AddFrom("[email protected]").
AddTo("[email protected]").
AddSubject("Test Doulivery").
AddBody("Hi Test")
err := mailer.SendEmail()
if err != nil {
t.Errorf("error test: " + err.Error())
}
Send email with files
client := CreateClient("app_id", "key", "secret")
b, _ := ioutil.ReadFile("file_path")
//Here, you can use GMAIL or MAILGUN
mailer := CreateMailer(client, "GMAIL").
AddFrom("[email protected]").
AddTo("[email protected]").
AddSubject("Test Doulivery file").
AddBody("Hola Prueba file").
AddFile(File{Name: "README.md", Content: b})
err := mailer.SendEmail()
if err != nil {
t.Errorf("error test: " + err.Error())
}
# Constants
No description provided by the author
# Variables
No description provided by the author