| Hash | Commit message | Author | Date | Files | + | - |
1 | commit fa4cb65590dd7f5d82b9c122e7314aad811388d3 |
2 | Author: Connor Etherington <[email protected]> |
3 | Date: Fri Apr 14 01:22:57 2023 +0200 |
4 | |
5 | Auto-Commit Update 14.04.2023 - 01:22:57 |
6 | --- |
7 | .bkp/user-register.js.~1~ | 274 ++++++++++++++++++++++++++++ |
8 | .env | 3 + |
9 | .gitignore | 6 + |
10 | clients/freepaid/templates/passwordReset.js | 246 +++++++++++++++++++++++++ |
11 | clients/freepaid/templates/user-register.js | 246 +++++++++++++++++++++++++ |
12 | config/clients.json | 28 +++ |
13 | methods/mkTemplates.js | 67 +++++++ |
14 | models/client.js | 14 ++ |
15 | models/template.js | 12 ++ |
16 | package.json | 19 ++ |
17 | server.js | 101 ++++++++++ |
18 | yarn.lock | 169 +++++++++++++++++ |
19 | 12 files changed, 1185 insertions(+) |
20 | |
21 | diff --git a/.bkp/user-register.js.~1~ b/.bkp/user-register.js.~1~ |
22 | new file mode 100644 |
23 | index 0000000..5a3b916 |
24 | --- /dev/null |
25 | +++ b/.bkp/user-register.js.~1~ |
26 | @@ -0,0 +1,274 @@ |
27 | + |
28 | +const html = `<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
29 | +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> |
30 | + |
31 | +<head> |
32 | + <!--[if gte mso 9]> <xml> <o:OfficeDocumentSettings> <o:AllowPNG/> <o:PixelsPerInch>96</o:PixelsPerInch> </o:OfficeDocumentSettings> </xml> <![endif]--> |
33 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
34 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
35 | + <meta name="x-apple-disable-message-reformatting"> |
36 | + <!--[if !mso]><!--> |
37 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
38 | + <!--<![endif]--> |
39 | + <title></title> |
40 | + <style type="text/css"> |
41 | + @media only screen and (min-width: 620px) { .u-row { width: 600px !important; } .u-row .u-col { vertical-align: top; } .u-row .u-col-50 { width: 300px !important; } .u-row .u-col-100 { width: 600px !important; } } @media (max-width: 620px) { .u-row-container { max-width: 100% !important; padding-left: 0px !important; padding-right: 0px !important; } .u-row .u-col { min-width: 320px !important; max-width: 100% !important; display: block !important; } .u-row { width: calc(100% - 40px) !important; } .u-col { width: 100% !important; } .u-col > div { margin: 0 auto; } } body { margin: 0; padding: 0; } table, tr, td { vertical-align: top; border-collapse: collapse; } p { margin: 0; } .ie-container table, .mso-container table { table-layout: fixed; } * { line-height: inherit; } a[x-apple-data-detectors='true'] { color: inherit !important; text-decoration: none !important; } table, td { color: #000000; } #u_body a { color: #03ff; text-decoration: underline; } @media (max-width: 480px) { #u_content_image_1 .v-src-width { width: auto !important; } #u_content_image_1 .v-src-max-width { max-width: 47% !important; } #u_content_text_4 .v-line-height { line-height: 130% !important; } } |
42 | + </style> |
43 | + <!--[if !mso]><!--> |
44 | + <link href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap" rel="stylesheet" type="text/css"> |
45 | + <!--<![endif]--> |
46 | +</head> |
47 | + |
48 | +<body class="clean-body u_body" style="margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #c9c9c9;color: #000000"> |
49 | + <!--[if IE]><div class="ie-container"><![endif]--> |
50 | + <!--[if mso]><div class="mso-container"><![endif]--> |
51 | + <table id="u_body" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #c9c9c9;width:100%" cellpadding="0" cellspacing="0"> |
52 | + <tbody> |
53 | + <tr style="vertical-align: top"> |
54 | + <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top"> |
55 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #c9c9c9;"><![endif]--> |
56 | + <div class="u-row-container" style="padding: 0px;background-color: #c9c9c9"> |
57 | + <div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #c9c9c9;"> |
58 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
59 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: #c9c9c9;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #c9c9c9;"><![endif]--> |
60 | + <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]--> |
61 | + <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;"> |
62 | + <div style="height: 100%;width: 100% !important;"> |
63 | + <!--[if (!mso)&(!IE)]><!--> |
64 | + <div style="height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"> |
65 | + <!--<![endif]--> |
66 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
67 | + <tbody> |
68 | + <tr> |
69 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:15px;font-family:'Lato',sans-serif;" align="left"> |
70 | + <table height="0px" align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;border-top: 1px solid #c9c9c9;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%"> |
71 | + <tbody> |
72 | + <tr style="vertical-align: top"> |
73 | + <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top;font-size: 0px;line-height: 0px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%"> <span> </span> </td> |
74 | + </tr> |
75 | + </tbody> |
76 | + </table> |
77 | + </td> |
78 | + </tr> |
79 | + </tbody> |
80 | + </table> |
81 | + <!--[if (!mso)&(!IE)]><!--> |
82 | + </div> |
83 | + <!--<![endif]--> |
84 | + </div> |
85 | + </div> |
86 | + <!--[if (mso)|(IE)]></td><![endif]--> |
87 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
88 | + </div> |
89 | + </div> |
90 | + </div> |
91 | + <div class="u-row-container" style="padding: 0px;background-color: transparent"> |
92 | + <div class="u-row" style="box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 10%);Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #eeeeee;box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 10%); border-bottom: 2px solid rgba(0, 0, 0, 0.125);"> |
93 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
94 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #ffffff;"><![endif]--> |
95 | + <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]--> |
96 | + <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;"> |
97 | + <div style="height: 100%;width: 100% !important;"> |
98 | + <!--[if (!mso)&(!IE)]><!--> |
99 | + <div style="height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"> |
100 | + <!--<![endif]--> |
101 | + <table id="u_content_image_1" style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
102 | + <tbody> |
103 | + <tr> |
104 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:25px 10px;font-family:'Lato',sans-serif;" align="left"> |
105 | + <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
106 | + <tr> |
107 | + <td style="padding-right: 0px;padding-left: 0px;" align="center"> |
108 | + <a href="\${baseUrl}" target="_blank"> <img align="center" border="0" src="\${logo}" alt="\${baseName}" title="30GBServices" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 34%;max-width: 197.2px;" width="197.2" class="v-src-width v-src-max-width" /> </a> |
109 | + </td> |
110 | + </tr> |
111 | + </table> |
112 | + </td> |
113 | + </tr> |
114 | + </tbody> |
115 | + </table> |
116 | + <!--[if (!mso)&(!IE)]><!--> |
117 | + </div> |
118 | + <!--<![endif]--> |
119 | + </div> |
120 | + </div> |
121 | + <!--[if (mso)|(IE)]></td><![endif]--> |
122 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
123 | + </div> |
124 | + </div> |
125 | + </div> |
126 | + <div class="u-row-container" style="padding: 0px;background-color: transparent"> |
127 | + <div class="u-row" style="box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 10%);Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #ffffff;"> |
128 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
129 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #ffffff;"><![endif]--> |
130 | + <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px dashed transparent;border-left: 0px dashed transparent;border-right: 0px dashed transparent;border-bottom: 0px dashed transparent;" valign="top"><![endif]--> |
131 | + <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;"> |
132 | + <div style="height: 100%;width: 100% !important;"> |
133 | + <!--[if (!mso)&(!IE)]><!--> |
134 | + <div style="height: 100%; padding: 0px;border-top: 0px dashed transparent;border-left: 0px dashed transparent;border-right: 0px dashed transparent;border-bottom: 0px dashed transparent;"> |
135 | + <!--<![endif]--> |
136 | + <table id="u_content_text_4" style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
137 | + <tbody> |
138 | + <tr> |
139 | + <td style="overflow-wrap:break-word;padding:40px 40px 30px;font-family:'Lato',sans-serif;word-break: break-all; word-wrap: break-word;" align="left"> |
140 | + <div class="v-line-height" style="line-height: 180%; text-align: left; word-wrap: break-word;margin-right:10%"> |
141 | + \${message} |
142 | + </div> |
143 | + </td> |
144 | + </tr> |
145 | + </tbody> |
146 | + </table> |
147 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
148 | + <tbody> |
149 | + <tr> |
150 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:0px 40px;font-family:'Lato',sans-serif;" align="left"> |
151 | + <div align="left"> |
152 | + <!--[if mso]><div class="mso-container"><![endif]--> |
153 | + <a href="\${link}" target="_blank" style="box-sizing: border-box;display: inline-block;font-family:'Lato',sans-serif;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #FFFFFF; background-color: #199013; border-radius: 5px;-webkit-border-radius: 5px; -moz-border-radius: 5px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none; box-shadow: 0 0 2px 1px rgba(0,0,0,0.6);"> |
154 | + <span class="v-line-height" style="display:block;padding:10px 20px;line-height:120%;"> |
155 | + <span style="font-size: 18px; line-height: 21.6px;">Verify E-Mail</span> |
156 | + </span> |
157 | + </a> |
158 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #f9f9f9;"><![endif]--> |
159 | + </div> |
160 | + </td> |
161 | + </tr> |
162 | + </tbody> |
163 | + </table> |
164 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
165 | + <tbody> |
166 | + <tr> |
167 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:40px 40px 30px;font-family:'Lato',sans-serif;" align="left"> |
168 | + <div class="v-line-height" style="line-height: 140%; text-align: left; word-wrap: break-word;"> |
169 | + <p style="font-size: 14px; line-height: 140%;"> |
170 | + <span style="color: #888888; font-size: 14px; line-height: 19.6px;"> |
171 | + <em> |
172 | + <span style="font-size: 16px; line-height: 22.4px;">Please ignore this email if you did not recently register with us</span> |
173 | + </em> |
174 | + </span> |
175 | + <br /> |
176 | + <span style="color: #888888; font-size: 14px; line-height: 19.6px;"> |
177 | + <em> |
178 | + <span style="font-size: 16px; line-height: 22.4px;"> </span> |
179 | + </em> |
180 | + </span> |
181 | + </p> |
182 | + </div> |
183 | + </td> |
184 | + </tr> |
185 | + </tbody> |
186 | + </table> |
187 | + <div class="u-row-container" style="padding: 0px;background-color: transparent"> |
188 | + <div class="u-row" style="box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 10%);Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #eeeeee; padding-bottom:10px;border-top: 2px solid rgba(0, 0, 0, 0.125);"> |
189 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
190 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #eeeeee;"><![endif]--> |
191 | + <!--[if (mso)|(IE)]><td align="center" width="300" style="width: 300px;padding: 20px 20px 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]--> |
192 | + <div class="u-col u-col-50" style="max-width: 320px;min-width: 300px;display: table-cell;vertical-align: top;"> |
193 | + <div style="height: 100%;width: 100% !important;"> |
194 | + <!--[if (!mso)&(!IE)]><!--> |
195 | + <div style="height: 100%; padding: 7px 20px 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"> |
196 | + <!--<![endif]--> |
197 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
198 | + <tbody> |
199 | + <tr> |
200 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:'Lato',sans-serif;" align="left"> |
201 | + <div class="v-line-height" style="line-height: 140%; text-align: left; word-wrap: break-word;"> |
202 | + <p style="font-size: 14px; line-height: 140%;"><span style="font-size: 12px; line-height: 16.8px; color: #000000;">\${from}</span></p> |
203 | + <p style="font-size: 14px; line-height: 140%;"><span style="font-size: 12px; line-height: 16.8px; color: #000000;">© All Rights Reserved</span></p> |
204 | + </div> |
205 | + </td> |
206 | + </tr> |
207 | + </tbody> |
208 | + </table> |
209 | + <!--[if (!mso)&(!IE)]><!--> |
210 | + </div> |
211 | + <!--<![endif]--> |
212 | + </div> |
213 | + </div> |
214 | + <!--[if (mso)|(IE)]></td><![endif]--> |
215 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
216 | + </div> |
217 | + </div> |
218 | + </div> |
219 | + <!--[if (mso)|(IE)]></td><![endif]--> |
220 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
221 | + </div> |
222 | + </div> |
223 | + </div> |
224 | + </td> |
225 | + </tr> |
226 | + </tbody> |
227 | + </table> |
228 | + <table id="u_body" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #c9c9c9;width:100%" cellpadding="0" cellspacing="0"> |
229 | + <tbody> |
230 | + <tr style="vertical-align: top"> |
231 | + <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top"> |
232 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #c9c9c9;"><![endif]--> |
233 | + <div class="u-row-container" style="padding: 0px;background-color: #c9c9c9"> |
234 | + <div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #c9c9c9;"> |
235 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
236 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: #c9c9c9;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #c9c9c9;"><![endif]--> |
237 | + <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]--> |
238 | + <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;"> |
239 | + <div style="height: 100%;width: 100% !important;"> |
240 | + <!--[if (!mso)&(!IE)]><!--> |
241 | + <div style="height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"> |
242 | + <!--<![endif]--> |
243 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
244 | + <tbody> |
245 | + <tr> |
246 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:15px;font-family:'Lato',sans-serif;" align="left"> |
247 | + <table height="0px" align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;border-top: 1px solid #c9c9c9;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%"> |
248 | + <tbody> |
249 | + <tr style="vertical-align: top"> |
250 | + <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top;font-size: 0px;line-height: 0px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%"> <span> </span> </td> |
251 | + </tr> |
252 | + </tbody> |
253 | + </table> |
254 | + </td> |
255 | + </tr> |
256 | + </tbody> |
257 | + </table> |
258 | + <!--[if (!mso)&(!IE)]><!--> |
259 | + </div> |
260 | + <!--<![endif]--> |
261 | + </div> |
262 | + </div> |
263 | + <!--[if (mso)|(IE)]></td><![endif]--> |
264 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
265 | + </div> |
266 | + </div> |
267 | + </div> |
268 | + <!--[if mso]></div><![endif]--> |
269 | + <!--[if IE]></div><![endif]--> |
270 | +</body> |
271 | + |
272 | +</html> |
273 | +` |
274 | +const fs = require('fs'); |
275 | +const Template = require('../models/template'); |
276 | +const Client = require('../models/client'); |
277 | +const main = async () => { |
278 | + |
279 | + const client = await Client.findOne({ name: 'FREEPAID' }); |
280 | + |
281 | + const template = await Template.create({ |
282 | + client: client._id, |
283 | + name: 'Test', |
284 | + emails: { |
285 | + name: 'user-register', |
286 | + html |
287 | + } |
288 | + }); |
289 | + |
290 | + console.log(template); |
291 | + await template.save(); |
292 | + console.log('Template created'); |
293 | + process.exit(); |
294 | + |
295 | +}; |
296 | + |
297 | + |
298 | +module.exports = { UR: main }; |
299 | + |
300 | + |
301 | diff --git a/.env b/.env |
302 | new file mode 100644 |
303 | index 0000000..809d8c0 |
304 | --- /dev/null |
305 | +++ b/.env |
306 | @@ -0,0 +1,3 @@ |
307 | + |
308 | +URI="mongodb+srv://a4to:c1b120d56bb97eb37fbc45f009e33f03f2840@mycondb.bt5st8l.mongodb.net/mailer?retryWrites=true" |
309 | + |
310 | diff --git a/.gitignore b/.gitignore |
311 | new file mode 100644 |
312 | index 0000000..163aac5 |
313 | --- /dev/null |
314 | +++ b/.gitignore |
315 | @@ -0,0 +1,6 @@ |
316 | +node_modules |
317 | +server/node_modules |
318 | +client/node_modules |
319 | +frontend/node_modules |
320 | +backend/node_modules |
321 | + |
322 | diff --git a/clients/freepaid/templates/passwordReset.js b/clients/freepaid/templates/passwordReset.js |
323 | new file mode 100644 |
324 | index 0000000..f80ac5b |
325 | --- /dev/null |
326 | +++ b/clients/freepaid/templates/passwordReset.js |
327 | @@ -0,0 +1,246 @@ |
328 | +module.exports = `<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
329 | +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> |
330 | + |
331 | +<head> |
332 | + <!--[if gte mso 9]> <xml> <o:OfficeDocumentSettings> <o:AllowPNG/> <o:PixelsPerInch>96</o:PixelsPerInch> </o:OfficeDocumentSettings> </xml> <![endif]--> |
333 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
334 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
335 | + <meta name="x-apple-disable-message-reformatting"> |
336 | + <!--[if !mso]><!--> |
337 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
338 | + <!--<![endif]--> |
339 | + <title></title> |
340 | + <style type="text/css"> |
341 | + @media only screen and (min-width: 620px) { .u-row { width: 600px !important; } .u-row .u-col { vertical-align: top; } .u-row .u-col-50 { width: 300px !important; } .u-row .u-col-100 { width: 600px !important; } } @media (max-width: 620px) { .u-row-container { max-width: 100% !important; padding-left: 0px !important; padding-right: 0px !important; } .u-row .u-col { min-width: 320px !important; max-width: 100% !important; display: block !important; } .u-row { width: calc(100% - 40px) !important; } .u-col { width: 100% !important; } .u-col > div { margin: 0 auto; } } body { margin: 0; padding: 0; } table, tr, td { vertical-align: top; border-collapse: collapse; } p { margin: 0; } .ie-container table, .mso-container table { table-layout: fixed; } * { line-height: inherit; } a[x-apple-data-detectors='true'] { color: inherit !important; text-decoration: none !important; } table, td { color: #000000; } #u_body a { color: #03ff; text-decoration: underline; } @media (max-width: 480px) { #u_content_image_1 .v-src-width { width: auto !important; } #u_content_image_1 .v-src-max-width { max-width: 47% !important; } #u_content_text_4 .v-line-height { line-height: 130% !important; } } |
342 | + </style> |
343 | + <!--[if !mso]><!--> |
344 | + <link href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap" rel="stylesheet" type="text/css"> |
345 | + <!--<![endif]--> |
346 | +</head> |
347 | + |
348 | +<body class="clean-body u_body" style="margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #c9c9c9;color: #000000"> |
349 | + <!--[if IE]><div class="ie-container"><![endif]--> |
350 | + <!--[if mso]><div class="mso-container"><![endif]--> |
351 | + <table id="u_body" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #c9c9c9;width:100%" cellpadding="0" cellspacing="0"> |
352 | + <tbody> |
353 | + <tr style="vertical-align: top"> |
354 | + <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top"> |
355 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #c9c9c9;"><![endif]--> |
356 | + <div class="u-row-container" style="padding: 0px;background-color: #c9c9c9"> |
357 | + <div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #c9c9c9;"> |
358 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
359 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: #c9c9c9;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #c9c9c9;"><![endif]--> |
360 | + <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]--> |
361 | + <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;"> |
362 | + <div style="height: 100%;width: 100% !important;"> |
363 | + <!--[if (!mso)&(!IE)]><!--> |
364 | + <div style="height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"> |
365 | + <!--<![endif]--> |
366 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
367 | + <tbody> |
368 | + <tr> |
369 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:15px;font-family:'Lato',sans-serif;" align="left"> |
370 | + <table height="0px" align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;border-top: 1px solid #c9c9c9;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%"> |
371 | + <tbody> |
372 | + <tr style="vertical-align: top"> |
373 | + <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top;font-size: 0px;line-height: 0px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%"> <span> </span> </td> |
374 | + </tr> |
375 | + </tbody> |
376 | + </table> |
377 | + </td> |
378 | + </tr> |
379 | + </tbody> |
380 | + </table> |
381 | + <!--[if (!mso)&(!IE)]><!--> |
382 | + </div> |
383 | + <!--<![endif]--> |
384 | + </div> |
385 | + </div> |
386 | + <!--[if (mso)|(IE)]></td><![endif]--> |
387 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
388 | + </div> |
389 | + </div> |
390 | + </div> |
391 | + <div class="u-row-container" style="padding: 0px;background-color: transparent"> |
392 | + <div class="u-row" style="box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 10%);Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #eeeeee;box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 10%); border-bottom: 2px solid rgba(0, 0, 0, 0.125);"> |
393 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
394 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #ffffff;"><![endif]--> |
395 | + <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]--> |
396 | + <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;"> |
397 | + <div style="height: 100%;width: 100% !important;"> |
398 | + <!--[if (!mso)&(!IE)]><!--> |
399 | + <div style="height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"> |
400 | + <!--<![endif]--> |
401 | + <table id="u_content_image_1" style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
402 | + <tbody> |
403 | + <tr> |
404 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:25px 10px;font-family:'Lato',sans-serif;" align="left"> |
405 | + <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
406 | + <tr> |
407 | + <td style="padding-right: 0px;padding-left: 0px;" align="center"> |
408 | + <a href="${baseUrl}" target="_blank"> <img align="center" border="0" src="${logo}" alt="${baseName}" title="30GBServices" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 34%;max-width: 197.2px;" width="197.2" class="v-src-width v-src-max-width" /> </a> |
409 | + </td> |
410 | + </tr> |
411 | + </table> |
412 | + </td> |
413 | + </tr> |
414 | + </tbody> |
415 | + </table> |
416 | + <!--[if (!mso)&(!IE)]><!--> |
417 | + </div> |
418 | + <!--<![endif]--> |
419 | + </div> |
420 | + </div> |
421 | + <!--[if (mso)|(IE)]></td><![endif]--> |
422 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
423 | + </div> |
424 | + </div> |
425 | + </div> |
426 | + <div class="u-row-container" style="padding: 0px;background-color: transparent"> |
427 | + <div class="u-row" style="box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 10%);Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #ffffff;"> |
428 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
429 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #ffffff;"><![endif]--> |
430 | + <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px dashed transparent;border-left: 0px dashed transparent;border-right: 0px dashed transparent;border-bottom: 0px dashed transparent;" valign="top"><![endif]--> |
431 | + <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;"> |
432 | + <div style="height: 100%;width: 100% !important;"> |
433 | + <!--[if (!mso)&(!IE)]><!--> |
434 | + <div style="height: 100%; padding: 0px;border-top: 0px dashed transparent;border-left: 0px dashed transparent;border-right: 0px dashed transparent;border-bottom: 0px dashed transparent;"> |
435 | + <!--<![endif]--> |
436 | + <table id="u_content_text_4" style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
437 | + <tbody> |
438 | + <tr> |
439 | + <td style="overflow-wrap:break-word;padding:40px 40px 30px;font-family:'Lato',sans-serif;word-break: break-all; word-wrap: break-word;" align="left"> |
440 | + <div class="v-line-height" style="line-height: 180%; text-align: left; word-wrap: break-word;margin-right:10%"> |
441 | + ${message} |
442 | + </div> |
443 | + </td> |
444 | + </tr> |
445 | + </tbody> |
446 | + </table> |
447 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
448 | + <tbody> |
449 | + <tr> |
450 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:0px 40px;font-family:'Lato',sans-serif;" align="left"> |
451 | + <div align="left"> |
452 | + <!--[if mso]><div class="mso-container"><![endif]--> |
453 | + <a href="${link}" target="_blank" style="box-sizing: border-box;display: inline-block;font-family:'Lato',sans-serif;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #FFFFFF; background-color: #199013; border-radius: 5px;-webkit-border-radius: 5px; -moz-border-radius: 5px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none; box-shadow: 0 0 2px 1px rgba(0,0,0,0.6);"> |
454 | + <span class="v-line-height" style="display:block;padding:10px 20px;line-height:120%;"> |
455 | + <span style="font-size: 18px; line-height: 21.6px;">Verify E-Mail</span> |
456 | + </span> |
457 | + </a> |
458 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #f9f9f9;"><![endif]--> |
459 | + </div> |
460 | + </td> |
461 | + </tr> |
462 | + </tbody> |
463 | + </table> |
464 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
465 | + <tbody> |
466 | + <tr> |
467 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:40px 40px 30px;font-family:'Lato',sans-serif;" align="left"> |
468 | + <div class="v-line-height" style="line-height: 140%; text-align: left; word-wrap: break-word;"> |
469 | + <p style="font-size: 14px; line-height: 140%;"> |
470 | + <span style="color: #888888; font-size: 14px; line-height: 19.6px;"> |
471 | + <em> |
472 | + <span style="font-size: 16px; line-height: 22.4px;">Please ignore this email if you did not recently register with us</span> |
473 | + </em> |
474 | + </span> |
475 | + <br /> |
476 | + <span style="color: #888888; font-size: 14px; line-height: 19.6px;"> |
477 | + <em> |
478 | + <span style="font-size: 16px; line-height: 22.4px;"> </span> |
479 | + </em> |
480 | + </span> |
481 | + </p> |
482 | + </div> |
483 | + </td> |
484 | + </tr> |
485 | + </tbody> |
486 | + </table> |
487 | + <div class="u-row-container" style="padding: 0px;background-color: transparent"> |
488 | + <div class="u-row" style="box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 10%);Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #eeeeee; padding-bottom:10px;border-top: 2px solid rgba(0, 0, 0, 0.125);"> |
489 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
490 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #eeeeee;"><![endif]--> |
491 | + <!--[if (mso)|(IE)]><td align="center" width="300" style="width: 300px;padding: 20px 20px 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]--> |
492 | + <div class="u-col u-col-50" style="max-width: 320px;min-width: 300px;display: table-cell;vertical-align: top;"> |
493 | + <div style="height: 100%;width: 100% !important;"> |
494 | + <!--[if (!mso)&(!IE)]><!--> |
495 | + <div style="height: 100%; padding: 7px 20px 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"> |
496 | + <!--<![endif]--> |
497 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
498 | + <tbody> |
499 | + <tr> |
500 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:'Lato',sans-serif;" align="left"> |
501 | + <div class="v-line-height" style="line-height: 140%; text-align: left; word-wrap: break-word;"> |
502 | + <p style="font-size: 14px; line-height: 140%;"><span style="font-size: 12px; line-height: 16.8px; color: #000000;">${from}</span></p> |
503 | + <p style="font-size: 14px; line-height: 140%;"><span style="font-size: 12px; line-height: 16.8px; color: #000000;">© All Rights Reserved</span></p> |
504 | + </div> |
505 | + </td> |
506 | + </tr> |
507 | + </tbody> |
508 | + </table> |
509 | + <!--[if (!mso)&(!IE)]><!--> |
510 | + </div> |
511 | + <!--<![endif]--> |
512 | + </div> |
513 | + </div> |
514 | + <!--[if (mso)|(IE)]></td><![endif]--> |
515 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
516 | + </div> |
517 | + </div> |
518 | + </div> |
519 | + <!--[if (mso)|(IE)]></td><![endif]--> |
520 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
521 | + </div> |
522 | + </div> |
523 | + </div> |
524 | + </td> |
525 | + </tr> |
526 | + </tbody> |
527 | + </table> |
528 | + <table id="u_body" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #c9c9c9;width:100%" cellpadding="0" cellspacing="0"> |
529 | + <tbody> |
530 | + <tr style="vertical-align: top"> |
531 | + <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top"> |
532 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #c9c9c9;"><![endif]--> |
533 | + <div class="u-row-container" style="padding: 0px;background-color: #c9c9c9"> |
534 | + <div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #c9c9c9;"> |
535 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
536 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: #c9c9c9;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #c9c9c9;"><![endif]--> |
537 | + <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]--> |
538 | + <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;"> |
539 | + <div style="height: 100%;width: 100% !important;"> |
540 | + <!--[if (!mso)&(!IE)]><!--> |
541 | + <div style="height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"> |
542 | + <!--<![endif]--> |
543 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
544 | + <tbody> |
545 | + <tr> |
546 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:15px;font-family:'Lato',sans-serif;" align="left"> |
547 | + <table height="0px" align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;border-top: 1px solid #c9c9c9;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%"> |
548 | + <tbody> |
549 | + <tr style="vertical-align: top"> |
550 | + <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top;font-size: 0px;line-height: 0px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%"> <span> </span> </td> |
551 | + </tr> |
552 | + </tbody> |
553 | + </table> |
554 | + </td> |
555 | + </tr> |
556 | + </tbody> |
557 | + </table> |
558 | + <!--[if (!mso)&(!IE)]><!--> |
559 | + </div> |
560 | + <!--<![endif]--> |
561 | + </div> |
562 | + </div> |
563 | + <!--[if (mso)|(IE)]></td><![endif]--> |
564 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
565 | + </div> |
566 | + </div> |
567 | + </div> |
568 | + <!--[if mso]></div><![endif]--> |
569 | + <!--[if IE]></div><![endif]--> |
570 | +</body> |
571 | + |
572 | +</html> |
573 | +` |
574 | diff --git a/clients/freepaid/templates/user-register.js b/clients/freepaid/templates/user-register.js |
575 | new file mode 100644 |
576 | index 0000000..a3527d6 |
577 | --- /dev/null |
578 | +++ b/clients/freepaid/templates/user-register.js |
579 | @@ -0,0 +1,246 @@ |
580 | +module.exports = `<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
581 | +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> |
582 | + |
583 | +<head> |
584 | + <!--[if gte mso 9]> <xml> <o:OfficeDocumentSettings> <o:AllowPNG/> <o:PixelsPerInch>96</o:PixelsPerInch> </o:OfficeDocumentSettings> </xml> <![endif]--> |
585 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
586 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
587 | + <meta name="x-apple-disable-message-reformatting"> |
588 | + <!--[if !mso]><!--> |
589 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
590 | + <!--<![endif]--> |
591 | + <title></title> |
592 | + <style type="text/css"> |
593 | + @media only screen and (min-width: 620px) { .u-row { width: 600px !important; } .u-row .u-col { vertical-align: top; } .u-row .u-col-50 { width: 300px !important; } .u-row .u-col-100 { width: 600px !important; } } @media (max-width: 620px) { .u-row-container { max-width: 100% !important; padding-left: 0px !important; padding-right: 0px !important; } .u-row .u-col { min-width: 320px !important; max-width: 100% !important; display: block !important; } .u-row { width: calc(100% - 40px) !important; } .u-col { width: 100% !important; } .u-col > div { margin: 0 auto; } } body { margin: 0; padding: 0; } table, tr, td { vertical-align: top; border-collapse: collapse; } p { margin: 0; } .ie-container table, .mso-container table { table-layout: fixed; } * { line-height: inherit; } a[x-apple-data-detectors='true'] { color: inherit !important; text-decoration: none !important; } table, td { color: #000000; } #u_body a { color: #03ff; text-decoration: underline; } @media (max-width: 480px) { #u_content_image_1 .v-src-width { width: auto !important; } #u_content_image_1 .v-src-max-width { max-width: 47% !important; } #u_content_text_4 .v-line-height { line-height: 130% !important; } } |
594 | + </style> |
595 | + <!--[if !mso]><!--> |
596 | + <link href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap" rel="stylesheet" type="text/css"> |
597 | + <!--<![endif]--> |
598 | +</head> |
599 | + |
600 | +<body class="clean-body u_body" style="margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #c9c9c9;color: #000000"> |
601 | + <!--[if IE]><div class="ie-container"><![endif]--> |
602 | + <!--[if mso]><div class="mso-container"><![endif]--> |
603 | + <table id="u_body" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #c9c9c9;width:100%" cellpadding="0" cellspacing="0"> |
604 | + <tbody> |
605 | + <tr style="vertical-align: top"> |
606 | + <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top"> |
607 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #c9c9c9;"><![endif]--> |
608 | + <div class="u-row-container" style="padding: 0px;background-color: #c9c9c9"> |
609 | + <div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #c9c9c9;"> |
610 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
611 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: #c9c9c9;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #c9c9c9;"><![endif]--> |
612 | + <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]--> |
613 | + <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;"> |
614 | + <div style="height: 100%;width: 100% !important;"> |
615 | + <!--[if (!mso)&(!IE)]><!--> |
616 | + <div style="height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"> |
617 | + <!--<![endif]--> |
618 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
619 | + <tbody> |
620 | + <tr> |
621 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:15px;font-family:'Lato',sans-serif;" align="left"> |
622 | + <table height="0px" align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;border-top: 1px solid #c9c9c9;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%"> |
623 | + <tbody> |
624 | + <tr style="vertical-align: top"> |
625 | + <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top;font-size: 0px;line-height: 0px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%"> <span> </span> </td> |
626 | + </tr> |
627 | + </tbody> |
628 | + </table> |
629 | + </td> |
630 | + </tr> |
631 | + </tbody> |
632 | + </table> |
633 | + <!--[if (!mso)&(!IE)]><!--> |
634 | + </div> |
635 | + <!--<![endif]--> |
636 | + </div> |
637 | + </div> |
638 | + <!--[if (mso)|(IE)]></td><![endif]--> |
639 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
640 | + </div> |
641 | + </div> |
642 | + </div> |
643 | + <div class="u-row-container" style="padding: 0px;background-color: transparent"> |
644 | + <div class="u-row" style="box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 10%);Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #eeeeee;box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 10%); border-bottom: 2px solid rgba(0, 0, 0, 0.125);"> |
645 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
646 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #ffffff;"><![endif]--> |
647 | + <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]--> |
648 | + <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;"> |
649 | + <div style="height: 100%;width: 100% !important;"> |
650 | + <!--[if (!mso)&(!IE)]><!--> |
651 | + <div style="height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"> |
652 | + <!--<![endif]--> |
653 | + <table id="u_content_image_1" style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
654 | + <tbody> |
655 | + <tr> |
656 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:25px 10px;font-family:'Lato',sans-serif;" align="left"> |
657 | + <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
658 | + <tr> |
659 | + <td style="padding-right: 0px;padding-left: 0px;" align="center"> |
660 | + <a href="\${baseUrl}" target="_blank"> <img align="center" border="0" src="\${logo}" alt="\${baseName}" title="30GBServices" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 34%;max-width: 197.2px;" width="197.2" class="v-src-width v-src-max-width" /> </a> |
661 | + </td> |
662 | + </tr> |
663 | + </table> |
664 | + </td> |
665 | + </tr> |
666 | + </tbody> |
667 | + </table> |
668 | + <!--[if (!mso)&(!IE)]><!--> |
669 | + </div> |
670 | + <!--<![endif]--> |
671 | + </div> |
672 | + </div> |
673 | + <!--[if (mso)|(IE)]></td><![endif]--> |
674 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
675 | + </div> |
676 | + </div> |
677 | + </div> |
678 | + <div class="u-row-container" style="padding: 0px;background-color: transparent"> |
679 | + <div class="u-row" style="box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 10%);Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #ffffff;"> |
680 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
681 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #ffffff;"><![endif]--> |
682 | + <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px dashed transparent;border-left: 0px dashed transparent;border-right: 0px dashed transparent;border-bottom: 0px dashed transparent;" valign="top"><![endif]--> |
683 | + <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;"> |
684 | + <div style="height: 100%;width: 100% !important;"> |
685 | + <!--[if (!mso)&(!IE)]><!--> |
686 | + <div style="height: 100%; padding: 0px;border-top: 0px dashed transparent;border-left: 0px dashed transparent;border-right: 0px dashed transparent;border-bottom: 0px dashed transparent;"> |
687 | + <!--<![endif]--> |
688 | + <table id="u_content_text_4" style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
689 | + <tbody> |
690 | + <tr> |
691 | + <td style="overflow-wrap:break-word;padding:40px 40px 30px;font-family:'Lato',sans-serif;word-break: break-all; word-wrap: break-word;" align="left"> |
692 | + <div class="v-line-height" style="line-height: 180%; text-align: left; word-wrap: break-word;margin-right:10%"> |
693 | + \${message} |
694 | + </div> |
695 | + </td> |
696 | + </tr> |
697 | + </tbody> |
698 | + </table> |
699 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
700 | + <tbody> |
701 | + <tr> |
702 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:0px 40px;font-family:'Lato',sans-serif;" align="left"> |
703 | + <div align="left"> |
704 | + <!--[if mso]><div class="mso-container"><![endif]--> |
705 | + <a href="\${link}" target="_blank" style="box-sizing: border-box;display: inline-block;font-family:'Lato',sans-serif;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #FFFFFF; background-color: #199013; border-radius: 5px;-webkit-border-radius: 5px; -moz-border-radius: 5px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none; box-shadow: 0 0 2px 1px rgba(0,0,0,0.6);"> |
706 | + <span class="v-line-height" style="display:block;padding:10px 20px;line-height:120%;"> |
707 | + <span style="font-size: 18px; line-height: 21.6px;">Verify E-Mail</span> |
708 | + </span> |
709 | + </a> |
710 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #f9f9f9;"><![endif]--> |
711 | + </div> |
712 | + </td> |
713 | + </tr> |
714 | + </tbody> |
715 | + </table> |
716 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
717 | + <tbody> |
718 | + <tr> |
719 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:40px 40px 30px;font-family:'Lato',sans-serif;" align="left"> |
720 | + <div class="v-line-height" style="line-height: 140%; text-align: left; word-wrap: break-word;"> |
721 | + <p style="font-size: 14px; line-height: 140%;"> |
722 | + <span style="color: #888888; font-size: 14px; line-height: 19.6px;"> |
723 | + <em> |
724 | + <span style="font-size: 16px; line-height: 22.4px;">Please ignore this email if you did not recently register with us</span> |
725 | + </em> |
726 | + </span> |
727 | + <br /> |
728 | + <span style="color: #888888; font-size: 14px; line-height: 19.6px;"> |
729 | + <em> |
730 | + <span style="font-size: 16px; line-height: 22.4px;"> </span> |
731 | + </em> |
732 | + </span> |
733 | + </p> |
734 | + </div> |
735 | + </td> |
736 | + </tr> |
737 | + </tbody> |
738 | + </table> |
739 | + <div class="u-row-container" style="padding: 0px;background-color: transparent"> |
740 | + <div class="u-row" style="box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 10%);Margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #eeeeee; padding-bottom:10px;border-top: 2px solid rgba(0, 0, 0, 0.125);"> |
741 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
742 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #eeeeee;"><![endif]--> |
743 | + <!--[if (mso)|(IE)]><td align="center" width="300" style="width: 300px;padding: 20px 20px 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]--> |
744 | + <div class="u-col u-col-50" style="max-width: 320px;min-width: 300px;display: table-cell;vertical-align: top;"> |
745 | + <div style="height: 100%;width: 100% !important;"> |
746 | + <!--[if (!mso)&(!IE)]><!--> |
747 | + <div style="height: 100%; padding: 7px 20px 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"> |
748 | + <!--<![endif]--> |
749 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
750 | + <tbody> |
751 | + <tr> |
752 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:'Lato',sans-serif;" align="left"> |
753 | + <div class="v-line-height" style="line-height: 140%; text-align: left; word-wrap: break-word;"> |
754 | + <p style="font-size: 14px; line-height: 140%;"><span style="font-size: 12px; line-height: 16.8px; color: #000000;">\${from}</span></p> |
755 | + <p style="font-size: 14px; line-height: 140%;"><span style="font-size: 12px; line-height: 16.8px; color: #000000;">© All Rights Reserved</span></p> |
756 | + </div> |
757 | + </td> |
758 | + </tr> |
759 | + </tbody> |
760 | + </table> |
761 | + <!--[if (!mso)&(!IE)]><!--> |
762 | + </div> |
763 | + <!--<![endif]--> |
764 | + </div> |
765 | + </div> |
766 | + <!--[if (mso)|(IE)]></td><![endif]--> |
767 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
768 | + </div> |
769 | + </div> |
770 | + </div> |
771 | + <!--[if (mso)|(IE)]></td><![endif]--> |
772 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
773 | + </div> |
774 | + </div> |
775 | + </div> |
776 | + </td> |
777 | + </tr> |
778 | + </tbody> |
779 | + </table> |
780 | + <table id="u_body" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #c9c9c9;width:100%" cellpadding="0" cellspacing="0"> |
781 | + <tbody> |
782 | + <tr style="vertical-align: top"> |
783 | + <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top"> |
784 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #c9c9c9;"><![endif]--> |
785 | + <div class="u-row-container" style="padding: 0px;background-color: #c9c9c9"> |
786 | + <div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 600px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: #c9c9c9;"> |
787 | + <div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;"> |
788 | + <!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: #c9c9c9;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:600px;"><tr style="background-color: #c9c9c9;"><![endif]--> |
789 | + <!--[if (mso)|(IE)]><td align="center" width="600" style="width: 600px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]--> |
790 | + <div class="u-col u-col-100" style="max-width: 320px;min-width: 600px;display: table-cell;vertical-align: top;"> |
791 | + <div style="height: 100%;width: 100% !important;"> |
792 | + <!--[if (!mso)&(!IE)]><!--> |
793 | + <div style="height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"> |
794 | + <!--<![endif]--> |
795 | + <table style="font-family:'Lato',sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0"> |
796 | + <tbody> |
797 | + <tr> |
798 | + <td style="overflow-wrap:break-word;word-break:break-word;padding:15px;font-family:'Lato',sans-serif;" align="left"> |
799 | + <table height="0px" align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;border-top: 1px solid #c9c9c9;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%"> |
800 | + <tbody> |
801 | + <tr style="vertical-align: top"> |
802 | + <td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top;font-size: 0px;line-height: 0px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%"> <span> </span> </td> |
803 | + </tr> |
804 | + </tbody> |
805 | + </table> |
806 | + </td> |
807 | + </tr> |
808 | + </tbody> |
809 | + </table> |
810 | + <!--[if (!mso)&(!IE)]><!--> |
811 | + </div> |
812 | + <!--<![endif]--> |
813 | + </div> |
814 | + </div> |
815 | + <!--[if (mso)|(IE)]></td><![endif]--> |
816 | + <!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]--> |
817 | + </div> |
818 | + </div> |
819 | + </div> |
820 | + <!--[if mso]></div><![endif]--> |
821 | + <!--[if IE]></div><![endif]--> |
822 | +</body> |
823 | + |
824 | +</html> |
825 | +` |
826 | diff --git a/config/clients.json b/config/clients.json |
827 | new file mode 100644 |
828 | index 0000000..2a6ed24 |
829 | --- /dev/null |
830 | +++ b/config/clients.json |
831 | @@ -0,0 +1,28 @@ |
832 | +[ |
833 | + { |
834 | + "name": "FREEPAID", |
835 | + "token": "SPk2xehvDx8SV9GR6hCjsDCCC2ZjIexxNg3ZlSuKRyd1yH82kymg9mVS1yfnUIYkDDEsBPZgh64vqvWE", |
836 | + "config": { |
837 | + "host": "mail.supersim.co.za", |
838 | + "port": 465, |
839 | + "secure": true, |
840 | + "auth": { |
841 | + "user": "[email protected]", |
842 | + "pass": "springbokke6" |
843 | + } |
844 | + } |
845 | + }, |
846 | + { |
847 | + "name": "CONCISE", |
848 | + "token": "ss0n08iyc9ohbjSCkGlt0ZJduRg6E1M6lM2QfTY0GtqoXlX0MnQAMvKhFpjr0bvemQhq8g852L0AjDLJ", |
849 | + "config": { |
850 | + "host": "smtp-relay.sendinblue.com", |
851 | + "port": 587, |
852 | + "secure": false, |
853 | + "auth": { |
854 | + "user": "[email protected]", |
855 | + "pass": "qbEw1zXxDg6hC9MQ" |
856 | + } |
857 | + } |
858 | + } |
859 | +] |
860 | diff --git a/methods/mkTemplates.js b/methods/mkTemplates.js |
861 | new file mode 100644 |
862 | index 0000000..5d172b8 |
863 | --- /dev/null |
864 | +++ b/methods/mkTemplates.js |
865 | @@ -0,0 +1,67 @@ |
866 | + |
867 | +const fs = require('fs'); |
868 | +const Template = require('../models/template'); |
869 | +const Client = require('../models/client'); |
870 | + |
871 | +const freepaidTemplates = fs.readdirSync('../clients/freepaid/templates'); |
872 | +const conciseTemplate = fs.readdirSync('../clients/concise/templates'); |
873 | + |
874 | +const main = async (clientName) => { |
875 | + |
876 | + const client = await Client.findOne({ name: clientName }); |
877 | + |
878 | + if (!client) { |
879 | + console.log('Client not found'); |
880 | + return; |
881 | + } else if (client.name === 'FREEPAID') { |
882 | + |
883 | + freepaidTemplates.forEach(async (template) => { |
884 | + |
885 | + const templateName = template.split('.')[0]; |
886 | + const templatePath = `../clients/freepaid/templates/${template}`; |
887 | + const templateContent = fs.readFileSync(templatePath, 'utf8'); |
888 | + |
889 | + const template = Template.findOne({ client: client._id, }); |
890 | + |
891 | + if (!template) { |
892 | + const newTemplate = new Template({ |
893 | + client: client._id, |
894 | + emails: [{ name: templateName, html: templateContent }] |
895 | + }); |
896 | + await newTemplate.save(); |
897 | + } else { |
898 | + template.emails.push({ name: templateName, html: templateContent }); |
899 | + await template.save(); |
900 | + } |
901 | + |
902 | + }); |
903 | + |
904 | + } else if (client.name === 'CONCISE') { |
905 | + |
906 | + conciseTemplates.forEach(async (template) => { |
907 | + |
908 | + const templateName = template.split('.')[0]; |
909 | + const templatePath = `../clients/concise/templates/${template}`; |
910 | + const templateContent = fs.readFileSync(templatePath, 'utf8'); |
911 | + |
912 | + const template = Template.findOne({ client: client._id, }); |
913 | + |
914 | + if (!template) { |
915 | + const newTemplate = new Template({ |
916 | + client: client._id, |
917 | + emails: [{ name: templateName, html: templateContent }] |
918 | + }); |
919 | + await newTemplate.save(); |
920 | + } else { |
921 | + template.emails.push({ name: templateName, html: templateContent }); |
922 | + await template.save(); |
923 | + } |
924 | + |
925 | + }); |
926 | + |
927 | + } |
928 | + |
929 | +} |
930 | + |
931 | +module.exports = { main }; |
932 | + |
933 | diff --git a/models/client.js b/models/client.js |
934 | new file mode 100644 |
935 | index 0000000..e1fc4d7 |
936 | --- /dev/null |
937 | +++ b/models/client.js |
938 | @@ -0,0 +1,14 @@ |
939 | + |
940 | +const mongoose = require('mongoose'); |
941 | + |
942 | +const ClientSchema = new mongoose.Schema({ |
943 | + name: { type: String }, |
944 | + token: { type: String }, |
945 | + config: { type: Object }, |
946 | + created_at: { type: Date, default: Date.now }, |
947 | +}); |
948 | + |
949 | +const Client = mongoose.model('Client', ClientSchema); |
950 | + |
951 | +module.exports = Client |
952 | + |
953 | diff --git a/models/template.js b/models/template.js |
954 | new file mode 100644 |
955 | index 0000000..df24100 |
956 | --- /dev/null |
957 | +++ b/models/template.js |
958 | @@ -0,0 +1,12 @@ |
959 | + |
960 | +const mongoose = require('mongoose'); |
961 | + |
962 | +const TemplateSchema = new mongoose.Schema({ |
963 | + client: { type: mongoose.Schema.Types.ObjectId, ref: 'Client' }, |
964 | + emails: [Object], |
965 | +}); |
966 | + |
967 | +const Template = mongoose.model('Template', TemplateSchema); |
968 | + |
969 | +module.exports = Template |
970 | + |
971 | diff --git a/package.json b/package.json |
972 | new file mode 100644 |
973 | index 0000000..492fd47 |
974 | --- /dev/null |
975 | +++ b/package.json |
976 | @@ -0,0 +1,19 @@ |
977 | +{ |
978 | + "name": "mailer", |
979 | + "version": "0.1.0", |
980 | + "main": "server.js", |
981 | + "scripts": { |
982 | + "start": "node ${npm_package_main}", |
983 | + "dev": "nodemon ${npm_package_main}" |
984 | + }, |
985 | + "bin": { |
986 | + "mailer": "./${npm_package_main}" |
987 | + }, |
988 | + "author": "Connor Etherington <[email protected]>", |
989 | + "license": "MIT", |
990 | + "dependencies": { |
991 | + "dotenv": "^16.0.3", |
992 | + "mongoose": "^7.0.3", |
993 | + "nodemailer": "^6.9.1" |
994 | + } |
995 | +} |
996 | diff --git a/server.js b/server.js |
997 | new file mode 100644 |
998 | index 0000000..a32187f |
999 | --- /dev/null |