1
00:00:00,900 --> 00:00:09,570
Here's my solution for the exercise of sending out an email with an attachment to each of the contacts

2
00:00:10,200 --> 00:00:17,850
in the contacts.csv file. After inserting my passwords in secret in a repl,

3
00:00:18,300 --> 00:00:28,650
then I log in with yagmail in here, create a pandas data frame and then iterate over that frame.

4
00:00:29,040 --> 00:00:32,369
so over contacts.csv, you see that

5
00:00:33,500 --> 00:00:38,030
I'm grabbing the receiver email in here.

6
00:00:39,460 --> 00:00:47,050
And inserting vets in this place holder in the f string, and the amount is also here.

7
00:00:47,680 --> 00:00:56,320
So since amount is part of the csv in here, so that, that and that.

8
00:01:00,060 --> 00:01:03,330
We have access to that column value as well.

9
00:01:04,379 --> 00:01:12,510
And lastly, as you can see, this content is a list so it has also another

10
00:01:15,060 --> 00:01:18,840
item, so it has this string.

11
00:01:21,090 --> 00:01:21,450
And

12
00:01:23,430 --> 00:01:27,930
this string which comes from the data frame.

13
00:01:28,080 --> 00:01:35,820
So this will be replaced by bill-1 in the first iteration, bill-2 in the second iteration,

14
00:01:35,820 --> 00:01:36,090
bill-3.

15
00:01:36,120 --> 00:01:39,510
So for each of the rows, we will get that.

16
00:01:39,750 --> 00:01:45,270
I hope that is completely clear and this works pretty well for me.

17
00:01:45,630 --> 00:01:46,050
Thank you.

