WEBVTT

0
00:00.180 --> 00:05.040
Hey there, welcome to day 32 of 100 Days of Code. Now,

1
00:05.040 --> 00:05.670
today

2
00:05.670 --> 00:10.560
we're going to be learning about email SMTP and the date time module.

3
00:11.130 --> 00:15.930
Basically, we're going to learn how to send email using Python code.

4
00:16.350 --> 00:20.430
And we're going to determine when we send the email using this daytime time

5
00:20.430 --> 00:23.850
module. And once we've learned all of those skills,

6
00:24.150 --> 00:29.150
we're going to be building a really interesting and possibly helpful tool where

7
00:29.850 --> 00:34.850
we can automate a happy birthday email to all of our friends and family.

8
00:36.870 --> 00:41.870
So, I probably only remember a handful of people's emails off by heart and the

9
00:42.900 --> 00:47.010
rest of the time, I rely pretty much on Facebook telling me that it's so,

10
00:47.010 --> 00:51.600
and so's birthday. And I end up writing on their timeline.

11
00:52.080 --> 00:56.490
But if Facebook didn't tell me, I would probably not remember.

12
00:57.060 --> 01:01.860
Now I know some friends of mine are really good at remembering everybody's

13
01:02.060 --> 01:02.893
birthday,

14
01:03.110 --> 01:06.860
even if they don't go on the Facebook and they'll send you a message every year

15
01:07.280 --> 01:09.530
showing how good of a friend they are.

16
01:09.620 --> 01:12.770
And it always makes me feel a little bit bad inside.

17
01:13.280 --> 01:16.850
So what's our solution? To remember everybody's date of birth?

18
01:17.180 --> 01:20.750
No. We're going to build a Python program.

19
01:21.410 --> 01:26.360
And this Python program is going to be the automated birthday wisher.

20
01:27.110 --> 01:28.100
All we have to do it is

21
01:28.220 --> 01:33.020
create a spreadsheet of all of our friend's birthdays and then create a bunch of

22
01:33.020 --> 01:33.680
emails

23
01:33.680 --> 01:38.240
and we'll randomly pick an email to send to each of these friends.

24
01:38.990 --> 01:42.830
And this program is going to teach us some skills in Python

25
01:43.100 --> 01:45.140
helping us level up as a programmer.

26
01:45.350 --> 01:49.730
But it also makes us better people because our friends will feel like we

27
01:49.730 --> 01:54.410
remember their birthdays and help our friends feel more appreciated.

28
01:55.880 --> 02:00.080
Email SMTP is a module that comes pre-bundled with Python

29
02:00.440 --> 02:04.370
and it helps us send email using Python code.

30
02:05.210 --> 02:10.210
And daytime is another Python module that helps us figure out what today's date

31
02:10.820 --> 02:15.710
is or how to format a particular date and time. And in our case,

32
02:15.740 --> 02:20.330
it's going to help us figure out if today happens to be the day of one of our

33
02:20.330 --> 02:23.900
friend's birthdays, in which case we'll send them a birthday email.

34
02:24.500 --> 02:27.320
So that's the plan. Head over to the next lesson

35
02:27.530 --> 02:30.650
and we'll get started by learning how to send email.