Closed diegogr-cit closed 4 years ago
@tomscript,
As mentioned in #39 I include here html/template abstraction to be used on template.
//Template: "Hello Admin, {{.Content}}" fileName := "template.tmpl" body := struct { Content string }{ Content: "body message", } //Use by template entity: tmpl := NewTemplate(fileName) res, err := tmpl.Render(body) //Using by email entity: email = NewEmail(service) email.RenderTemplate("template.tmpl", body)
Just to organize I moved the common interface/response code from Email Client to client/email.go and extract external specific code to email_sendgrid.go, lmk if what you think.
@tomscript,
As mentioned in #39 I include here html/template abstraction to be used on template.
Just to organize I moved the common interface/response code from Email Client to client/email.go and extract external specific code to email_sendgrid.go, lmk if what you think.