How I Email Myself Data from my Python Scripts
Ғылым және технология
This is how I keep myself updated via email using Python.
github.com/jhnwr/python-email
Patreon: / johnwatsonrooney
Proxies: iproyal.club/JWR50
Hosting: Digital Ocean: m.do.co/c/c7c90f161ff6
Gear I use: www.amazon.co.uk/shop/johnwat...
Пікірлер: 44
I sent an email to myself to remind me to thank you for another great video. Works like a charm!
@JohnWatsonRooney
Жыл бұрын
Haha thanks for watching I’m glad you enjoyed it
This was very informative, thank you John! Sending emails can be a pain sometimes.
@JohnWatsonRooney
2 жыл бұрын
Whenever I need to email I just grab this code I have saved and paste it in!
@DominicNweze
Жыл бұрын
@@JohnWatsonRooney that happens if the package gets taken out or down, What happens if the codes gets changed. We have to find another way. We have to stay sufficient, volatile, untouchable, hungry, angry, useful
Best youtube channel about py tricks atm
@JohnWatsonRooney
2 жыл бұрын
Thanks very kind!
Gmail is still very simple (and secure) to use to send emails from Python. Gmail simply now requires using the application password, not the account password. Everything else is as before. The application password can be generated in gmail settings.
Great! Thanks for giving me an alternative since less secure apps not available on google anymore.
@JohnWatsonRooney
2 жыл бұрын
No problem thanks for watching
@webslinger2011
Жыл бұрын
@@JohnWatsonRooney Tried but failed to authenticate on my existing program. Need to set an admin work account.
Reinforcement of stmt I learned a month ago. Thanks John
Thanks man! i really need this idea.
@JohnWatsonRooney
2 жыл бұрын
Great thanks for watching
Thank you, that was helpful!
@JohnWatsonRooney
2 жыл бұрын
Thanks !
Hi John, thanks for the tutorial. I have a question, I've been trying to receive emails with my gmail account but I always face with authontication error. Is there a way to receive emails from a gmail account without this kind of problems?
Awesome! Sir kindly make videos on . How to place the same script on different cloud platforms like AWS,Azure, Google and send email by settting time trigger.. Thanks!
By far the best tutorial on sending HTML in email via python I could find. Do you know of any way to forma the table using this same base script?
@JohnWatsonRooney
Жыл бұрын
thanks! i have done that before, i think i cheated and used pandas to do dataframe.to_html() to create the table for me.
Hi Watson... Can you make python module for ip rotator ... Easy to use for everyone 🙂
Could you show us how we can schedule a script to run script.py each day at a certain time?
@JohnWatsonRooney
2 жыл бұрын
Sure I’ll look too incorporate that into a video
@humansaremortal3803
2 жыл бұрын
@@JohnWatsonRooney #!/bin/bash echo 'scrapping start' /home/myawesomepc/anaconda3/envs/datascience/bin/python /home/myawesomepc/Documents/dev-py/scrapsomething/start.py echo 'scrapping completed' i have created exec_command.sh and tried using some schedule but failed and gave up in the end
@JohnWatsonRooney
2 жыл бұрын
@@humansaremortal3803 did you use cron?
Hi..! This will work only when you have sender mail of outlook? Not for gmail?
@JohnWatsonRooney
2 жыл бұрын
Yes this exact code, but you can make it work with gmail in a very similar way. You need to login to gmail and generate an app password (less secure apps no longer exists) and then use that with gmail SMTP and port
any way to login to Gmail using python and firefox without block I try it but i get (This browser or app may not be secure)
@JohnWatsonRooney
2 жыл бұрын
You have use their full authentication, as they removed the “less secure apps” option just recently
@waelali757
2 жыл бұрын
@@JohnWatsonRooney they actually havent removed less secure but made it work with different method that involves different password used in script after adding it to trust devices
Problem with email scripts when compiled into exe file antivirus treat them as virus and get deleted so fast
@JohnWatsonRooney
2 жыл бұрын
Fair point, I don’t use windows on desktop or server (where I run scripts with this) so hasn’t been an issue for me but that’s for bringing it up
@waelali757
2 жыл бұрын
@@JohnWatsonRooney wise choice because windows and pyton scripts are a bit of (better keep away friends)
Does this works despite the very recent update( May 30, 2022) of Less secure apps & your Google Account?
@tituskan2874
2 жыл бұрын
I have tried it and I kept getting Authentication error despite I'm able to login with the username and password I proivded.
@JohnWatsonRooney
2 жыл бұрын
This is for using outlook mail provider not gmail. If you want to use gmail still you need to create an app password on your account and use that, which is the replacement for less secure apps
how we can do this automatically ?
@JohnWatsonRooney
Жыл бұрын
I run it on a Linux server on a cronjob
@shayanhdry6224
Жыл бұрын
@@JohnWatsonRooney thanks
update july it s not working
@JohnWatsonRooney
2 жыл бұрын
Really? Mine is working ok, I get a few emails at 8am everyday. I did have an issue where I got blocked but all I had to do was login as normal again and it’s been fine since
pip install redmail
@JohnWatsonRooney
2 жыл бұрын
Sure that is a good option. I prefer to stay away from extra dependencies where I can though
@waelali757
2 жыл бұрын
@@JohnWatsonRooney true that easier to be compiled with pyinstaller