/
template.yaml
147 lines (125 loc) · 4.3 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
##
## Mail Client
##
## (Required) Mail Client
mailclient:
##
## Connection
##
## (Required) How server connection is made
connection:
## (Required) SMTP User
## Ex: SMTPUser: "info"
SMTPUser: "XXX@outlook.com"
## (Required) SMT Server
## Ex: SMTPServer: "smtp.gmail.com"
SMTPServer: "smtp.office365.com"
## (Required) SMTP Port
## Ex: SMTPPort: 465
SMTPPort: 587
## (Required) Secure connection to Server ("yes"/<any>)
TLS: "yes"
##
## Email Message
##
## (Required) How email message is constructed
message:
## Required) Subject:
Subject: "What is the meaning of life?"
## (Required) From:
## Some providers do not like to relay arbitrary `From` emails.
## Make sure the "From" is a legitimate your@email.com
## Ex. From: "info@xxxx.org" or "Name <info@xxxx.org>"
From: "Joe B <info@xxxx.org>"
## (Required) To:
## You can gather destination email addresses in two ways:
## 1. a direct email in the configuration file (this)
## 2. a list of emails from the storage (e.g. database)
## Ex. To: "xxxx@gmail.com"
## Ex. To: "/path/to/campaign.db"
To: "campaign.db"
## (Optional) mark:
## If a (1) direct email is used, you may need to setup additional
## attributes of the mark manually. They can be used in the email
## template. You can always define other template-only attributes
## in the `template-data` sub-section
mark:
## (Optional)
FirstName: "First"
## (Optional)
LastName: "Last"
## (Optional)
Identifier: "345345sdfsdf"
## (Optional)
## We would like the templates to have access to additional metadata
template-data:
dictionary:
key: "val"
## (Optional) headers: Email envelope headers
## Ex: Return-Receipt-To: "info@xxxx.com"
headers:
## (Required) body: email body text/html templates to
## construct email message from
## Templates can substitute dynamic variables (See. Template Section for details).
## Emails a multipart MIME, so both text and html versions of the email are needed.
body:
html: "campaign1/message.htpl"
text: "campaign1/message.ttpl"
## (Optional) attach: attach files to email
attach:
# Format:
# - "/path/evil_report1.pdf"
# - "/path/evil_report2.pdf"
## (Optional) embed: embed assets into email
## This is useful to embed images vs. sourcing them in from the Internet
embed:
# Format:
# - "/path/logo_header.png"
# - "/path/logo_footer.png"
##
## Storage
##
## (Required) How marks are stored and retrieved, management of storage
storage:
## (Required) SQL database file, where store records
DBFile: "/paths/campaign.db"
## (Required) load: loader of records from a list
load:
## (Required) load: loader of mark records from a CSV list
## <id>,email,[first name],[last name]
SourceFile: "/path/marks.csv"
## (Required) IdentifierRegex: Identifiers are used to track marks across the campaign.
## Regex is used to construct them
IdentifierRegex: "^[a-z0-9]{8}$"
## (Optional) manager: default task to run.
manager:
DBTask: "showmarks"
##
## Content
##
## (Optional) content: a list of tools to help with email content templating
content:
## Helps generate email templates by merging markdown with styling
generate:
## [In] Markdown file with email content
SourceMDFile: "campaign.md"
## [In] Location of styling and template to merge
SourceTemplateHTMLFile: "campaign.html.template"
## [Out] Email message template (Phase1)
TargetHTMLFile: "campaign.html"
## We would like the templates to have access to additional metadata at generation
template-data:
dictionary:
key: "val"
## Helps inline email styling for better compatibility with destination clients
inline:
## [In] Email message (Phase1)
SourceContentHTMLFile: "campaign.html"
## [Out] Email message (Phase2: Ready for send)
TargetMailTemplateHTMLFile: "campaign.htpl"
## Helps create multipart email from the HTML version
multipart:
# [In] Locaiton of a fully constructed HTML file ready for Email
SourceMailTemplateHTMLFile: "campaign.htpl"
# [Out] Location to save the Text version of the same
TargetMailTemplateTXTFile: "campaign.ttpl"