{{if .Greeting}}{{.Greeting}} {{ .Receiver }},{{end}}
{{/* Intros */}}
{{ with .Intros }}
{{ if gt (len .) 0 }}
{{ range $line := . }}
{{ $line }}
{{ end }}
{{ end }}
{{ end }}
{{/* actions */}}
{{with .Actions}}
{{if gt (len .) 0}}
{{range $action := .}}
{{ $action.Instructions }}
{{/* count width */}}
{{ $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}}
{{/* button */}}
{{end}}
{{end}}
{{end}}
{{/* Main Body */}}
{{ if (ne .Content "") }}
{{ .Content | ToHTML }}
{{ end }}
{{/* Outros */}}
{{ with .Outros }}
{{ if gt (len .) 0 }}
{{ range $line := . }}
{{ $line }}
{{ end }}
{{ end }}
{{ end }}
{{/* End Email */}}
{{if .Signature}}{{.Signature}}{{else}}Best Regards{{end}},
{{ if .Sender }}{{.Sender}}{{else}}{{.App.Name}}{{end}}
{{ with .Actions }}
{{ range $action := . }}
{{if $action.Button.Text}}
{{$.App.TroubleText | replace "{ACTION}" $action.Button.Text}}
{{ $action.Button.Link }}
|
{{ end }}
{{ end }}
{{ end }}
|