{{if .Email.Body.Title }}{{ .Email.Body.Title }}{{ else }}{{ .Email.Body.Greeting }} {{ .Email.Body.Name }},{{ end }}
{{ with .Email.Body.Intros }}
{{ if gt (len .) 0 }}
{{ range $line := . }}
{{ $line }}
{{ end }}
{{ end }}
{{ end }}
{{ if (ne .Email.Body.FreeMarkdown "") }}
{{ .Email.Body.FreeMarkdown.ToHTML }}
{{ else }}
{{ with .Email.Body.Dictionary }}
{{ if gt (len .) 0 }}
{{ range $entry := . }}
- {{ $entry.Key }}:
- {{ $entry.Value }}
{{ end }}
{{ end }}
{{ end }}
{{ with .Email.Body.Table }}
{{ $data := .Data }}
{{ $columns := .Columns }}
{{ if gt (len $data) 0 }}
{{ $col := index $data 0 }}
{{ range $entry := $col }}
{{ $entry.Key }}
|
{{ end }}
{{ range $row := $data }}
{{ range $cell := $row }}
{{ $cell.Value }}
|
{{ end }}
{{ end }}
|
{{ end }}
{{ end }}
{{ with .Email.Body.Actions }}
{{ if gt (len .) 0 }}
{{ range $action := . }}
{{ $action.Instructions }}
{{ $length := len $action.Button.Text }}
{{ $width := add (mul $length 9) 20 }}
{{if (lt $width 200)}}{{$width = 200}}{{else if (gt $width 570)}}{{$width = 570}}{{else}}{{end}}
{{safe "" }}
{{safe ""}}
{{safe "" }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ with .Email.Body.Outros }}
{{ if gt (len .) 0 }}
{{ range $line := . }}
{{ $line }}
{{ end }}
{{ end }}
{{ end }}
{{.Email.Body.Signature}},
{{.Hermes.Product.Name}}
{{ if (eq .Email.Body.FreeMarkdown "") }}
{{ with .Email.Body.Actions }}
{{ range $action := . }}
{{if $action.Button.Text}}
{{$.Hermes.Product.TroubleText | replace "{ACTION}" $action.Button.Text}}
{{ $action.Button.Link }}
|
{{ end }}
{{ end }}
{{ end }}
{{ end }}
|