-
Notifications
You must be signed in to change notification settings - Fork 6
/
mail_temp.py
615 lines (468 loc) · 23.5 KB
/
mail_temp.py
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
from string import Template
def mail_temp(name, email):
tweet = "I'm glad to tell that I will be attending DevFest Gandhinagar on 13th October. @GDG_Gandhinagar"
hashtags = "DevFestGnr,DevFest19,GDGGnr,WTMGnr,DevFest"
htmlString = Template('''
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title>
[ID Card] GDG Gandhinagar - DevFest 2019
</title>
<!--[if !mso]><!-- -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
#outlook a { padding:0; }
body { margin:0;padding:0;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%; }
table, td { border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt; }
img { border:0;height:auto;line-height:100%; outline:none;text-decoration:none;-ms-interpolation-mode:bicubic; }
p { display:block;margin:13px 0; }
</style>
<!--[if mso]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
<!--[if lte mso 11]>
<style type="text/css">
.mj-outlook-group-fix { width:100% !important; }
</style>
<![endif]-->
<!--[if !mso]><!-->
<link href="https://fonts.googleapis.com/css?family=Product+Sans" rel="stylesheet" type="text/css">
<style type="text/css">
@import url(https://fonts.googleapis.com/css?family=Product+Sans);
</style>
<!--<![endif]-->
<style type="text/css">
@media only screen and (min-width:480px) {
.mj-column-per-100 { width:100% !important; max-width: 100%; }
}
</style>
<style type="text/css">
[owa] .mj-column-per-100 { width:100% !important; max-width: 100%; }
</style>
<style type="text/css">
@media only screen and (max-width:480px) {
table.mj-full-width-mobile { width: 100% !important; }
td.mj-full-width-mobile { width: auto !important; }
}
</style>
</head>
<body style="background-color:#F4F4F4;">
<div
style="background-color:#F4F4F4;"
>
<!--[if mso | IE]>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="margin:0px auto;max-width:600px;">
<table
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"
>
<tbody>
<tr>
<td
style="direction:ltr;font-size:0px;padding:20px 0;padding-bottom:0px;padding-top:0px;text-align:center;"
>
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
<![endif]-->
<div
class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"
>
<table
border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"
>
<tr>
<td
align="center" style="font-size:0px;padding:10px 25px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;word-break:break-word;"
>
<table
border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;"
>
<tbody>
<tr>
<td style="width:600px;">
<img
alt="" height="auto" src="https://xpzml.mjt.lu/tplimg/xpzml/b/xpooo/vv27s.jpeg" style="border:none;border-radius:px;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" title="" width="600"
/>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="background:#000000;background-color:#000000;margin:0px auto;max-width:600px;">
<table
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#000000;background-color:#000000;width:100%;"
>
<tbody>
<tr>
<td
style="border:0px solid #ffffff;direction:ltr;font-size:0px;padding:20px 0px 20px 0px;padding-left:0px;padding-right:0px;text-align:center;"
>
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
<![endif]-->
<div
class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"
>
<table
border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"
>
<tr>
<td
align="left" style="font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-right:25px;padding-bottom:0px;padding-left:25px;word-break:break-word;"
>
<div
style="font-family:Arial, sans-serif;font-size:13px;line-height:22px;text-align:left;color:#55575d;"
><h1 style="font-size: 20px; font-weight: bold;"><span style="background-color:#000000; color:#ffffff"><span>Hey $name! </span></span></h1></div>
</td>
</tr>
<tr>
<td
align="left" style="font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word;"
>
<div
style="font-family:Arial, sans-serif;font-size:13px;line-height:22px;text-align:left;color:#55575d;"
><p style="font-size: 13px; margin: 10px 0;"><span style="font-size:13px;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif;"><span style="color:#ffffff;">Get excited! We would like to inform you that you have been<b style="font-weight:700"> </b><b style="font-weight:700">accepted <b style="font-weight:400;">for DevFest Gandhinagar</b>!</b> 🎉 How cool is that?</span></span></span></p><p style="font-size: 13px; margin: 10px 0;"><span style="font-size:13px;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif;"><span style="color:#ffffff;">We thank you for your patience. This year we received a large number of applications and hence took time to filter this out.</span></span></span></p><p style="font-size: 13px; margin: 10px 0;"><span style="font-size:13px;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif;"><span style="color:#ffffff;">We have attached your ID along with this mail!</span></span></span></p><p style="font-size: 13px; margin: 10px 0;"><span style="font-size:13px;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif;"><span style="color:#ffffff;">The event details are as follows:</span></span></span></p><ul><li style="margin: 10px 0px;"><span style="font-size:13px;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif;"><font color="#ffffff" face="Product Sans, Helvetica, Arial, sans-serif"><b style="font-weight:700;">Venue</b>: </font><span style="color:#ffffff;">LT-2 and LT-3, Dhirubhai Ambani Institute of Information and Communication Technology. Near Reliance Chowkdi<a target="_blank" href="https://www.google.com/maps/dir//daiict+maps/data=!4m6!4m5!1m1!4e2!1m2!1m1!1s0x395c2a3c9618d2c5:0xc54de484f986b1fa?sa=X&ved=2ahUKEwi6mO2n45PlAhVGfH0KHZeRAEAQ9RcwFnoECA8QDg"> </a></span></span></span></li><li style="margin: 10px 0px;"><span style="font-size:13px;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif;"><span style="color: rgb(255, 255, 255);"><b style="font-weight:700;">Date</b>: 13th October 2019</span></span></span></li><li style="margin: 10px 0px;"><b style="font-weight:700;"><span style="font-size: 13px; font-weight: 700;"><span style="font-family: " product="" sans",="" helvetica,="" arial,="" sans-serif;="" font-weight:="" 700;"=""><span style="color: rgb(255, 255, 255); font-weight: 700;">Time<b style="font-weight:400;">: 09:00 to 18:30 </b></span></span></span></b></li></ul><p style="font-size: 13px; margin: 10px 0;"><span style="font-size:13px;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif;"><span style="color:#ffffff;">So, what do you need to bring?</span></span></span></p><ul><li style="margin: 10px 0px;"><span style="font-size:13px;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif;"><font color="#ffffff">This mail with the ID sent to you</font></span></span></li><li style="margin: 10px 0px;"><span style="font-size:13px;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif;"><font color="#ffffff">Your phone to take lots of pics.</font></span></span></li><li style="margin: 10px 0px;"><span style="font-size:13px;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif;"><font color="#ffffff">Enthusiasm and love for the Developer Community.</font></span></span></li></ul><p style="font-size: 13px; margin: 10px 0;"><span style="font-size:13px;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif;"><span style="color:#ffffff;">We would love it if you tweet, post, share, talk to people that you are one of those who got confirmation with ID from DevFest Team. Use the button below to make an easy peasy tweet.</span></span></span></p></div>
</td>
</tr>
<tr>
<td
align="center" vertical-align="middle" style="font-size:0px;padding:10px 25px 10px 25px;padding-right:25px;padding-left:25px;word-break:break-word;"
>
<table
border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:separate;line-height:100%;"
>
<tr>
<td
align="center" bgcolor="#414141" role="presentation" style="border:0px solid #ffffff;border-radius:3px;cursor:auto;mso-padding-alt:10px 25px 10px 25px;background:#414141;" valign="middle"
>
<a
href="http://twitter.com/share?text=${tweet}&hashtags=${hashtags}&url=https://devfest.gdggandhinagar.org" style="display:inline-block;background:#414141;color:#ffffff;font-family:Product Sans, Helvetica, Arial, sans-serif;font-size:13px;font-weight:normal;line-height:120%;margin:0;text-decoration:none;text-transform:none;padding:10px 25px 10px 25px;mso-padding-alt:0px;border-radius:3px;" target="_blank"
>
<b style="font-weight:700">Tweet Now!</b>
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td
align="left" style="font-size:0px;padding:10px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word;"
>
<div
style="font-family:Arial, sans-serif;font-size:13px;line-height:24px;text-align:left;color:#000000;"
><p style="font-size: 13px; margin: 10px 0;"><font color="#ffffff" face="Product Sans, Helvetica, Arial, sans-serif"><span style="color:#ffffff;">Download Our Android App to follow our Timeline and get more updates there itself.</span><br><b style="font-weight:700;"><span style="color:#ffffff;">Download Link: </b> </span><a target="_blank" style="color: rgb(255, 255, 255);" href="https://github.com/GDG-GANDHINAGAR/devfest-19-mobile/releases/download/v1.4.2%2B6/DevFestGNR.apk"><span style="color:#ffffff;">Android App</span></a></font></p></div>
</td>
</tr>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="background:#ffffff;background-color:#ffffff;margin:0px auto;max-width:600px;">
<table
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%;"
>
<tbody>
<tr>
<td
style="direction:ltr;font-size:0px;padding:20px 0;padding-bottom:0px;padding-top:0px;text-align:center;"
>
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
<![endif]-->
<div
class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"
>
<table
border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"
>
<tr>
<td
align="center" style="background:#000000;font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-right:25px;padding-bottom:0px;padding-left:25px;word-break:break-word;"
>
<table
border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;"
>
<tbody>
<tr>
<td style="width:500px;">
<img
alt="" height="auto" src="https://media.giphy.com/media/11sBLVxNs7v6WA/giphy.gif" style="border:none;border-radius:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" title="" width="500"
/>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="background:#000000;background-color:#000000;margin:0px auto;max-width:600px;">
<table
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#000000;background-color:#000000;width:100%;"
>
<tbody>
<tr>
<td
style="border:0px solid #ffffff;direction:ltr;font-size:0px;padding:20px 0px 20px 0px;padding-left:0px;padding-right:0px;text-align:center;"
>
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
<![endif]-->
<div
class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"
>
<table
border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"
>
<tr>
<td
align="center" style="font-size:0px;padding:0px 20px 0px 20px;padding-top:0px;padding-bottom:0px;word-break:break-word;"
>
<div
style="font-family:Arial, sans-serif;font-size:11px;line-height:22px;text-align:center;color:#55575d;"
><p style="font-size: 13px; margin: 10px 0;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif"><span style="color:#ffffff">GDG Gandhinagar 2019</span></span></p></div>
</td>
</tr>
<tr>
<td
align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"
>
<!--[if mso | IE]>
<table
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation"
>
<tr>
<td>
<![endif]-->
<table
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;"
>
<tr
>
<td style="padding:4px;">
<table
border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#3B5998;border-radius:3px;width:20px;"
>
<tr>
<td style="font-size:0;height:20px;vertical-align:middle;width:20px;">
<a href="https://www.facebook.com/GDGGandhinagar/" target="_blank">
<img
height="20" src="https://www.mailjet.com/images/theme/v1/icons/ico-social/facebook.png" style="border-radius:3px;display:block;" width="20"
/>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if mso | IE]>
</td>
<td>
<![endif]-->
<table
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;"
>
<tr
>
<td style="padding:4px;">
<table
border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#1DA1F2;border-radius:3px;width:20px;"
>
<tr>
<td style="font-size:0;height:20px;vertical-align:middle;width:20px;">
<a href="https://twitter.com/GDG_Gandhinagar" target="_blank">
<img
height="20" src="https://www.mailjet.com/images/theme/v1/icons/ico-social/twitter.png" style="border-radius:3px;display:block;" width="20"
/>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<table
align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600"
>
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]-->
<div style="background:#000000;background-color:#000000;margin:0px auto;max-width:600px;">
<table
align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#000000;background-color:#000000;width:100%;"
>
<tbody>
<tr>
<td
style="border:0px solid #ffffff;direction:ltr;font-size:0px;padding:20px 0px 20px 0px;padding-left:0px;padding-right:0px;text-align:center;"
>
<!--[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td
class="" style="vertical-align:top;width:600px;"
>
<![endif]-->
<div
class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"
>
<table
border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%"
>
<tbody>
<tr>
<td style="vertical-align:top;padding:0;">
<table
border="0" cellpadding="0" cellspacing="0" role="presentation" style="" width="100%"
>
<tr>
<td
align="center" style="font-size:0px;padding:10px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word;"
>
<div
style="font-family:Arial, sans-serif;font-size:11px;line-height:22px;text-align:center;color:#000000;"
><p style="font-size: 13px; margin: 10px 0;"><span style="font-family:Product Sans,Helvetica,Arial,sans-serif"><span style="color:#ffffff">This e-mail has been sent to $email, </span><a target="_blank" style="color:#ffffff; text-decoration:none" href="[[UNSUB_LINK_EN]]"><span style="color:#ffffff">click here to unsubscribe</span></a><span style="color:#ffffff">.</span></span></p></div>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]>
</td>
</tr>
</table>
<![endif]-->
</div>
</body>
</html>
''')
return htmlString.substitute(name=name, email=email, tweet=tweet, hashtags=hashtags)