Commit a04a222a authored by Prajwal Patil's avatar Prajwal Patil
Browse files

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

Exported the ParseTemplateFile method located in email.go from notificationmdl for introducing the feature "Email Template Selection from Local Disk"
parent a626bf2f
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