1
00:00:00,450 --> 00:00:03,480
Here is my code for this exercise.

2
00:00:04,230 --> 00:00:14,970
In addition to the imports of the previous code, I also added import time, than what I did is I indented

3
00:00:14,970 --> 00:00:20,340
this code and inserted it under this while loop.

4
00:00:20,760 --> 00:00:24,420
So this code will be executed

5
00:00:24,420 --> 00:00:30,480
an unlimited number of times every 60 seconds.

6
00:00:30,720 --> 00:00:39,160
So in the first iteration, we're going to create an s STMP object instance in that same iteration.

7
00:00:39,180 --> 00:00:45,270
We're going to send out the email, we're going to print out emails sent and then we're going to stop

8
00:00:45,390 --> 00:00:47,820
the iteration for 60 seconds.

9
00:00:48,210 --> 00:00:58,530
After the 60 seconds pass, the loop will run again with another email sent out to the receiver email

10
00:00:58,530 --> 00:00:59,010
address.

11
00:00:59,400 --> 00:01:09,030
So if I run this script, you will see that email send is printed out and we should see that email has

12
00:01:09,030 --> 00:01:11,490
just been sent out at this time.

13
00:01:12,120 --> 00:01:17,970
So, after 60 seconds, we're going to get another email sent printed out in here.

14
00:01:18,330 --> 00:01:19,000
Here we go.

15
00:01:19,020 --> 00:01:22,260
And here is the new email as well.

16
00:01:22,500 --> 00:01:26,610
So the first one, the second one, and that's the code.

17
00:01:27,180 --> 00:01:27,510
Thanks.

