Commit e4ca95cb authored by Vijay Kumar Chauhan's avatar Vijay Kumar Chauhan
Browse files

Merge branch 'email-template-from-disk-1.20-pp' into 'devbranch'

Exported the ParseTemplateFile method located in email.go from notificationmdl...

See merge request !276
parents 69277c14 a04a222a
Branches
2 merge requests!277Exported the ParseTemplateFile method located in email.go from notificationmdl,!276Exported the ParseTemplateFile method located in email.go from notificationmdl...
Showing with 2 additions and 2 deletions
......@@ -78,7 +78,7 @@ func (email *Email) SetAlternateText(plainBody string) {
// SendMail - send email service sends email as per the given html template and data
//templateData can contain any type of values, including array, slice, map, struct and func
func (email *Email) SendMail(templateFilePath string, templateData interface{}) error {
err := email.parseTemplateFile(templateFilePath, templateData)
err := email.ParseTemplateFile(templateFilePath, templateData)
if errormdl.CheckErr(err) != nil {
loggermdl.LogError(err)
return err
......@@ -95,7 +95,7 @@ func (email *Email) SendMail(templateFilePath string, templateData interface{})
return nil
}
func (email *Email) parseTemplateFile(templateFilePath string, templateData interface{}) error {
func (email *Email) ParseTemplateFile(templateFilePath string, templateData interface{}) error {
tmplt, err := template.ParseFiles(templateFilePath)
if errormdl.CheckErr(err) != nil {
loggermdl.LogError("error occured while calling parseTemplateFile: ", errormdl.CheckErr(err))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment