18
18
// .catch((error) => {
19
19
// console.error(error)
20
20
// })
21
- const firstFetch = ( ) => {
22
- const data = {
23
- 'personalizations' : [
24
- {
25
- 'to' : [
26
- {
27
-
28
- }
29
- ]
30
- }
31
- ] ,
32
- 'from' : {
33
-
34
- } ,
35
- 'subject' : 'Testing!!' ,
36
- 'content' : [
37
- {
38
- 'type' : 'text/plain' ,
39
- 'value' : 'Heya! Im testing'
40
- }
41
- ]
42
- }
43
-
44
- //console.log(data)
45
- fetch ( "https://api.sendgrid.com/v3/mail/send" , {
46
- method : "POST" ,
47
- mode : "no-cors" ,
48
- // credentials: {
49
- // 'System' : 'Management',
50
- // 'Automation' : ''
51
- // },
52
- //Accept: "application/json",
53
- headers : {
54
- // "X-Auth-Token": "",
55
- "Content-Type" : "application/json" ,
56
- "Authorization" : "" ,
57
- } ,
58
-
59
- body : data ,
60
- } )
61
- . then ( ( response ) => console . log ( response . status ) )
62
- . then ( json => { console . log ( json ) } )
63
- . catch ( ( error ) => {
64
- console . error ( 'Error:' , error ) ;
65
- } ) ;
66
- } ;
67
-
68
-
69
- // const secondFetch = () => {
70
- // let url = 'https://docs.google.com/spreadsheets/d/1kyXZddzslOrQwXKWARsJXTNs7ZYj_DgbKovNdyoriJU/';
71
-
72
- // fetch(url)
73
- // .then(res => res.text())
74
- // .then(data => {
75
- // console.log(data)
76
- // })
77
- // }
78
-
79
- // const thirdFetch = () => {
80
- // let url = 'https://sheet.best/api/sheets/150d2564-50dd-4282-9031-ccc30b646aed';
81
-
82
- // fetch(url)
83
- // .then(res => res.json())
84
- // .then(data => {
85
- // console.log(data);
86
- // })
87
- // }
88
-
89
- // const postToSheat = () => {
90
- // //let url = 'https://sheet.best/api/sheets/150d2564-50dd-4282-9031-ccc30b646aed';
91
-
92
- // fetch("https://sheet.best/api/sheets/5f05d562-cf94-492b-aac8-195d3c57ec67", {
93
- // method: "POST",
94
- // mode: "cors",
95
- // headers: {
96
- // "Content-Type": "application/json"
97
- // },
98
- // body: JSON.stringify({
99
- // "Frist" : "Mike",
100
- // "Last " : "Mike",
101
- // "ID" : "7",
102
- // "Value" : "100",
103
- // "Created at": new Date(),
104
- // })
105
- // })
106
- // .then(response => response.json())
107
- // .then(data => console.log('success: ', data))
108
- // .catch((error) => {
109
- // console.error('Error: ', error)
110
- // })
111
- // }
112
-
113
- // const buttonFetch = document.getElementById('spreads');
114
-
115
- // buttonFetch,addEventListener('click', (e) => {
116
- // postToSheat();
117
- // });
118
-
119
-
120
- // // https://docs.google.com/spreadsheets/d/1kyXZddzslOrQwXKWARsJXTNs7ZYj_DgbKovNdyoriJU/edit?usp=sharing
121
-
122
- // const emailForm = () => {
123
- // const exhibitor = document.getElementById('sendEmail');
124
-
125
- // exhibitor.addEventListener('click', (e) => {
126
-
127
- // let email = e.target.querySelector("input[name='email']").value;
128
- // console.log("working")
129
- // Email.send({
130
- // Host: "smtp.elasticemail.com",
131
-
132
- // Port: "2525",
133
- // Password: "ED930F949049591E09AB981289F0BCD48F52",
134
-
135
-
136
- // Subject: "Digital Nigeria registration",
137
-
138
- // Body: `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
139
- // <title>
140
- // </title>
141
- // <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
142
- // <meta name="viewport" content="width=device-width">
143
- // <style type="text/css">body, html {
144
- // margin: 0px;
145
- // padding: 0px;
146
- // -webkit-font-smoothing: antialiased;
147
- // text-size-adjust: none;
148
- // width: 100% !important;
149
- // }
150
- // table td, table {
151
- // }
152
- // #outlook a {
153
- // padding: 0px;
154
- // }
155
- // .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {
156
- // line-height: 100%;
157
- // }
158
- // .ExternalClass {
159
- // width: 100%;
160
- // }
161
- // @media only screen and (max-width: 480px) {
162
- // table tr td table.edsocialfollowcontainer {width: auto !important;} table, table tr td, table td {
163
- // width: 100% !important;
164
- // }
165
- // img {
166
- // width: inherit;
167
- // }
168
- // .layer_2 {
169
- // max-width: 100% !important;
170
- // }
171
- // .edsocialfollowcontainer table {
172
- // max-width: 25% !important;
173
- // }
174
- // .edsocialfollowcontainer table td {
175
- // padding: 10px !important;
176
- // }
177
- // }
178
- // </style>
179
- // <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
180
- // <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.8.0/spectrum.min.css">
181
- // </head><body style="padding: 0px; margin: 0px; background: url("https://api.smtprelay.co/userfile/0d0b99ac-bce0-488d-8237-ac5e2e4f9c73/Digital_Nigeria_Banner_2022_mub_1.jpg");" data-new-gr-c-s-check-loaded="14.1022.0" data-gr-ext-installed="" data-new-gr-c-s-loaded="14.1022.0">
182
- // <table style="height: 100%; width: 100%;" align="center">
183
- // <tbody>
184
- // <tr>
185
- // <td valign="top" id="dbody" data-version="2.31" style="width: 100%; height: 100%; padding-top: 30px; padding-bottom: 30px;">
186
- // <!--[if (gte mso 9)|(IE)]><table align="center" style="max-width:600px" width="600" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><![endif]-->
187
- // <table class="layer_1" align="center" border="0" cellpadding="0" cellspacing="0" style="max-width: 600px; box-sizing: border-box; width: 100%; margin: 0px auto;">
188
- // <tbody>
189
-
190
- // <tr><td class="drow" valign="top" align="center" style="background-color: #efefef; box-sizing: border-box; font-size: 0px; text-align: center;"><!--[if (gte mso 9)|(IE)]><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><![endif]--><div class="layer_2" style="max-width: 600px; display: inline-block; vertical-align: top; width: 100%;"><table border="0" cellspacing="0" cellpadding="0" class="edcontent" style="border-collapse: collapse;width:100%"><tbody><tr><td valign="top" class="edimg" style="padding: 0px; box-sizing: border-box; text-align: center;"><img src="https://api.smtprelay.co/userfile/0d0b99ac-bce0-488d-8237-ac5e2e4f9c73/digital_Nigeria_logo32022-09-24T16_33_54.png" alt="Obraz" style="border-width: 0px; border-style: none; max-width: 198px; width: 100%;" width="198"></td></tr></tbody></table></div><!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td></tr>
191
- // <tr>
192
- // <td class="drow" valign="top" align="center" style="background-color: #ffffff; box-sizing: border-box; font-size: 0px; text-align: center;">
193
- // <!--[if (gte mso 9)|(IE)]><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><![endif]-->
194
- // <div class="layer_2" style="max-width: 600px; display: inline-block; vertical-align: top; width: 100%;">
195
- // <table border="0" cellspacing="0" cellpadding="0" class="edcontent" style="border-collapse: collapse;width:100%">
196
- // <tbody>
197
- // <tr>
198
- // <td valign="top" class="emptycell" style="padding: 10px;">
199
- // </td>
200
- // </tr>
201
- // </tbody>
202
- // </table>
203
- // </div>
204
- // <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
205
- // </td>
206
- // </tr>
207
- // <tr>
208
- // <td class="drow" valign="top" align="center" style="background-color: #ffffff; box-sizing: border-box; font-size: 0px; text-align: center;">
209
- // <!--[if (gte mso 9)|(IE)]><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><![endif]-->
210
- // <div class="layer_2" style="max-width: 600px; display: inline-block; vertical-align: top; width: 100%;">
211
- // <table border="0" cellspacing="0" cellpadding="0" class="edcontent" style="border-collapse: collapse; width: 100%;">
212
- // <tbody>
213
- // <tr>
214
- // <td valign="top" class="edimg" style="padding: 0px; box-sizing: border-box; text-align: center;">
215
- // <img src="https://api.elasticemail.com/userfile/a18de9fc-4724-42f2-b203-4992ceddc1de/geometric_divider1.png" alt="Image" width="576" style="border-width: 0px; border-style: none; max-width: 576px; width: 100%;">
216
- // </td>
217
- // </tr>
218
- // </tbody>
219
- // </table>
220
- // </div>
221
- // <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
222
- // </td>
223
- // </tr>
224
- // <tr>
225
- // <td class="drow" valign="top" align="center" style="background-color: #ffffff; box-sizing: border-box; font-size: 0px; text-align: center;">
226
- // <!--[if (gte mso 9)|(IE)]><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><![endif]-->
227
- // <div class="layer_2" style="max-width: 600px; display: inline-block; vertical-align: top; width: 100%;">
228
- // <table border="0" cellspacing="0" cellpadding="0" class="edcontent" style="border-collapse: collapse;width:100%">
229
- // <tbody>
230
- // <tr>
231
- // <td valign="top" class="emptycell" style="padding: 20px;">
232
- // </td>
233
- // </tr>
234
- // </tbody>
235
- // </table>
236
- // </div>
237
- // <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
238
- // </td>
239
- // </tr>
240
- // <tr>
241
- // <td class="drow" valign="top" align="center" style="background-color: #ffffff; box-sizing: border-box; font-size: 0px; text-align: center;">
242
- // <!--[if (gte mso 9)|(IE)]><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><![endif]-->
243
- // <div class="layer_2" style="max-width: 600px; display: inline-block; vertical-align: top; width: 100%;">
244
- // <table border="0" cellspacing="0" class="edcontent" style="border-collapse: collapse;width:100%">
245
- // <tbody>
246
- // <tr>
247
- // <td valign="top" class="edtext" style="padding: 20px; text-align: left; color: #5f5f5f; font-size: 14px; font-family: Helvetica, Arial, sans-serif; word-break: break-word; direction: ltr; box-sizing: border-box;">
248
- // <p class="style1 text-center" style="text-align: center; margin: 0px; padding: 0px; color: #f24656; font-size: 36px; font-family: Helvetica, Arial, sans-serif;">
249
- // <strong>THANK YOU
250
- // </strong>
251
- // </p>
252
- // <p class="text-center" style="text-align: center; margin: 0px; padding: 0px;">for registering with Digital Nigeria 2022</p>
253
- // </td>
254
- // </tr>
255
- // </tbody>
256
- // </table>
257
- // </div>
258
- // <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
259
- // </td>
260
- // </tr>
261
-
262
-
263
- // <tr>
264
- // <td class="drow" valign="top" align="center" style="background-color: #ffffff; box-sizing: border-box; font-size: 0px; text-align: center;">
265
- // <!--[if (gte mso 9)|(IE)]><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><![endif]-->
266
- // <div class="layer_2" style="max-width: 600px; display: inline-block; vertical-align: top; width: 100%;">
267
- // <table border="0" cellspacing="0" cellpadding="0" class="edcontent" style="border-collapse: collapse;width:100%">
268
- // <tbody>
269
- // <tr>
270
- // <td valign="top" class="emptycell" style="padding: 20px;">
271
- // </td>
272
- // </tr>
273
- // </tbody>
274
- // </table>
275
- // </div>
276
- // <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
277
- // </td>
278
- // </tr>
279
- // <tr>
280
- // <td class="drow" valign="top" align="center" style="background-color: #ffffff; box-sizing: border-box; font-size: 0px; text-align: center;">
281
- // <!--[if (gte mso 9)|(IE)]><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><![endif]-->
282
- // <div class="layer_2" style="max-width: 600px; display: inline-block; vertical-align: top; width: 100%;">
283
- // <table border="0" cellspacing="0" class="edcontent" style="border-collapse: collapse;width:100%">
284
- // <tbody>
285
- // <tr>
286
- // <td valign="top" class="edtext" style="padding: 20px; text-align: left; color: #5f5f5f; font-size: 14px; font-family: Helvetica, Arial, sans-serif; word-break: break-word; direction: ltr; box-sizing: border-box;">
287
- // <p style="margin: 0px; padding: 0px;">Have a question? Contact us: [email protected] </p>
288
- // </td>
289
- // </tr>
290
- // </tbody>
291
- // </table>
292
- // </div>
293
- // <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
294
- // </td>
295
- // </tr>
296
- // <tr>
297
- // <td class="drow" valign="top" align="center" style="background-color: #ffffff; box-sizing: border-box; font-size: 0px; text-align: center;">
298
- // <!--[if (gte mso 9)|(IE)]><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><![endif]-->
299
- // <div class="layer_2" style="max-width: 600px; display: inline-block; vertical-align: top; width: 100%;">
300
- // <table border="0" cellspacing="0" cellpadding="0" class="edcontent" style="border-collapse: collapse;width:100%">
301
- // <tbody>
302
- // <tr>
303
- // <td valign="top" class="emptycell" style="padding: 20px;">
304
- // </td>
305
- // </tr>
306
- // </tbody>
307
- // </table>
308
- // </div>
309
- // <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
310
- // </td>
311
- // </tr>
312
- // <tr>
313
- // <td class="drow" valign="top" align="center" style="background-color: #ffffff; box-sizing: border-box; font-size: 0px; text-align: center;">
314
- // <!--[if (gte mso 9)|(IE)]><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><![endif]-->
315
- // <div class="layer_2" style="max-width: 600px; display: inline-block; vertical-align: top; width: 100%;">
316
- // <table border="0" cellspacing="0" class="edcontent" style="border-collapse: collapse;width:100%">
317
- // <tbody>
318
- // <tr>
319
- // <td valign="top" class="edtext" style="padding: 20px; text-align: left; color: #5f5f5f; font-size: 14px; font-family: Helvetica, Arial, sans-serif; word-break: break-word; direction: ltr; box-sizing: border-box;">
320
- // <p class="text-center" style="text-align: center; margin: 0px; padding: 0px;">More Details will be sent to you shortly</p>
321
- // </td>
322
- // </tr>
323
- // </tbody>
324
- // </table>
325
- // </div>
326
- // <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
327
- // </td>
328
- // </tr>
329
- // <tr>
330
- // <td class="drow" valign="top" align="center" style="background-color: #ffffff; box-sizing: border-box; font-size: 0px; text-align: center;">
331
- // <!--[if (gte mso 9)|(IE)]><table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><![endif]-->
332
- // <div class="layer_2" style="max-width: 600px; display: inline-block; vertical-align: top; width: 100%;">
333
- // <table border="0" cellspacing="0" cellpadding="0" class="edcontent" style="border-collapse: collapse;width:100%">
334
- // <tbody>
335
- // <tr>
336
- // <td valign="top" class="edimg" style="padding: 0px; box-sizing: border-box; text-align: center;">
337
- // <img src="https://api.elasticemail.com/userfile/a18de9fc-4724-42f2-b203-4992ceddc1de/geometric_footer1.png" alt="Image" width="587" style="border-width: 0px; border-style: none; max-width: 587px; width: 100%;">
338
- // </td>
339
- // </tr>
340
- // </tbody>
341
- // </table>
342
- // </div>
343
- // <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
344
- // </td>
345
- // </tr>
346
-
347
- // </tbody>
348
- // </table>
349
- // <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
350
- // </td>
351
- // </tr>
352
- // </tbody>
353
- // </table>
354
- // </body><grammarly-desktop-integration data-grammarly-shadow-root="true"></grammarly-desktop-integration></html>`,
355
- // })
356
- // .then(function (message) {
357
- // console.log("mail sent successfully", message)
358
- // });
359
- // });
360
- // }
0 commit comments