My Reminder Bot
This is a reminder bot. In the amount of seconds you say, it sends you an email. Only people with gmail can use this. When it asks your email and password, you need to enter your gmail info. To use this, you have to switch on the Less Secure Apps
settings in your gmail.
It's cool and all, but I ain't putting in my email info lol
Ok. Your choice
@DynamicSquidikr lol
@DynamicSquidYou can actually store your password in a .env file.
@Nettakrimyou realise it's way easier. You just need to store the email password in the .env file in the format below.
MAILPASS=THEREALPASSWORD
and then in your main file do the code below.
@Nettakrimimport os mailpass = os.getenv("MAILPASS")
wouldnt it be better if you made it send an email with your account (prob a throwaway one anyway) that would be stored in environment variables?
then you just need to input [email protected]
and not your password
wdym?
@NettakrimSo it can login to your email. You send an email to yourself for the reminder
@Nettakrimusername = input("Email: (It has to be a gmail for this to work)\n") reminder = "[email protected]" password = #<stored in env variables so its hidden> gmail_server = smtplib.SMTP('smtp.gmail.com', 587) gmail_server.starttls(context=context) gmail_server.login(reminder, password) message["From"] = reminder message["To"] = username
gmail_server.sendmail(reminder, username, message.as_string()) #assuming first username there was "from" and second "to"
so that instead of your own account sending something, the reminder account sends it, and the gmail server thing logs in as the reminder, not the user but it sends to the user
+also you would only need to enable less secure apps on the [email protected] account
Nah man, I don't bother doing that
@NettakrimFor this program you do
@NettakrimThanks
@abdullahrajput9it wont let me type the password
Evaluation
No
Umm.. I don't get you
@HussainAli3What do you mean no?
@HussainAli3I am not going to put my info in here.
Ok. Your choice.
@MORGANISTHEBESTBut the code's nice
@VulcanWMThanks
@MORGANISTHEBESTExcellent,really helpful
Thanks
@suryan1234WHY DO I NEED TO ENTER MY PASSWORD?! I mean, even if it doesn't save, why????
LMAOooo
you should include a short tutorial for how to switch on the Less Secure Apps settings in your gmail. Also maybe make it a bit more precise for the time; like for 4:30pm, do we write 430, or 4:30, or 16:30, etc. because i was a little confused
ALso im not sure if its a bug, but for some reason i cant type my password. Like i can type all the previous info, but for the password nothing...
Cool!
Can't u hack our email if we put in a email password!
No, the password or email doesn't save or anything. Completely safe
@Chimmy210ohhh
Look at the code
@Chimmy210:)
@Chimmy210That's what all the hackers say lmao
@VulcanWMUmm...
@studentAlfredAlXD it's just a joke lol
@VulcanWMI know man
@studentAlfredAllol ;)
@VulcanWM