Here's my solution for the exercise of sending out an email with an attachment to each of the contacts
in the contacts.csv file. After inserting my passwords in secret in a repl,
then I log in with yagmail in here, create a pandas data frame and then iterate over that frame.
so over contacts.csv, you see that
I'm grabbing the receiver email in here.
And inserting vets in this place holder in the f string, and the amount is also here.
So since amount is part of the csv in here, so that, that and that.
We have access to that column value as well.
And lastly, as you can see, this content is a list so it has also another
item, so it has this string.
And
this string which comes from the data frame.
So this will be replaced by bill-1 in the first iteration, bill-2 in the second iteration,
bill-3.
So for each of the rows, we will get that.
I hope that is completely clear and this works pretty well for me.
Thank you.