Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
MKCLOS
Core Development Platform
corepkgv2
Commits
d814b6cc
Commit
d814b6cc
authored
5 years ago
by
Akshay Bharambe
Browse files
Options
Downloads
Patches
Plain Diff
Add: Method to add alternate text fro email
1. Add: Method to add alternate text fro email
parent
c7d3abd9
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!77
Add: Alternate text for email
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
notificationmdl/email/email.go
+6
-1
notificationmdl/email/email.go
with
6 additions
and
1 deletion
notificationmdl/email/email.go
+
6
−
1
View file @
d814b6cc
...
@@ -53,7 +53,7 @@ type Email struct {
...
@@ -53,7 +53,7 @@ type Email struct {
subject
string
subject
string
attachments
[]
string
attachments
[]
string
body
string
body
string
plainBody
string
plainBody
string
// alternate text if template fails
}
}
func
NewEmail
(
to
,
cc
,
bcc
,
attachments
[]
string
,
from
,
subject
,
body
string
)
*
Email
{
func
NewEmail
(
to
,
cc
,
bcc
,
attachments
[]
string
,
from
,
subject
,
body
string
)
*
Email
{
...
@@ -68,6 +68,11 @@ func NewEmail(to, cc, bcc, attachments []string, from, subject, body string) *Em
...
@@ -68,6 +68,11 @@ func NewEmail(to, cc, bcc, attachments []string, from, subject, body string) *Em
}
}
}
}
// SetAlternateText - set alternate text for email
func
(
email
*
Email
)
SetAlternateText
(
plainBody
string
)
{
email
.
plainBody
=
plainBody
}
// SendMail - send email service sends email as per the given html template and data
// 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
//templateData can contain any type of values, including array, slice, map, struct and func
func
(
email
*
Email
)
SendMail
(
templateFilePath
string
,
templateData
interface
{})
error
{
func
(
email
*
Email
)
SendMail
(
templateFilePath
string
,
templateData
interface
{})
error
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets