In this video, I'll show you how to create a program which detects the change in the price of an Amazon
product, and it sends out an email to your email address when the price changes.
If you followed the previous video, you should be.
Almost good to go.
All you need to change is done here in the account as I.D. authentication token and client.
So these lines were specific to the Smiths Notifier program.
So you need to
replace them with email parameters, which is a sensor and the receiver.
So the email address from which the email will be sent out.
And the receiver, which probably is your email address, so both should be your email address, actually.
And this will work only for Gmail accounts.
The sender and then you should go down here and change on the, if conditional, you want to change
that block to.
This block.
So where did I get this block?
Well, we already covered the sending of emails via Python in the email sending section above in the
course.
So you should take that section if you don't know what this code means.
So, Clint price, that's a surprise.
This variable, this one in here, price again.
So that's the body of the mass of the email and your Gmail is the library we're using.
So you don't need Twilio.
In this case, you need junk mail or your Gmail, which works only for Gmail accounts as the sender.
Of course.
Then down here we establish the email and we need OS.
We need to import OS in here as well.
With OS, we are able to access environment variables from April, in my case.
This was also covered in the email section.
So if the idea is that your passwords should be stored in some secrets in here, so which is passwords,
and then goes the passwords.
And here goes the actual password of your Gmail account to the sender, and then you should press that
secret there, and then this will get that passwords from that box.
And then you send out of email finally with this method, send.
And just print out something here, and that's it.
Whenever the price will change of this product.
This receiver here will receive an email with the data, so I didn't go and explain everything here
because I covered that in the previous video with the eSIMs case, so I didn't want to repeat everything
again.
You should see that previous video if you didn't seeds already, and that's it.
Thank you for following, and I'll talk to you later.