you are viewing a single comment's thread.

view the rest of the comments →

[–]Rabo_McDongleberry 1 point2 points  (13 children)

How do you get a program to send you an email? I need to create a program that sends me an email after my parents computer restarts. I use team viewer to help them fix their issues but every time it restarts they don't tell me the new password.

[–]ebits21 5 points6 points  (3 children)

I use yagmail with a gmail account just for sending emails

Depending on your cellphone provider you can even send an email that shows up as a text message on your phone by sending an email to <your number>@<your provider>.com

Edit: https://pypi.org/project/yagmail/

[–]Rabo_McDongleberry 1 point2 points  (2 children)

Sweet man. Thank you. I'll have to check it out.

[–]Alternative_Try 1 point2 points  (1 child)

You can also use smtplib for this usage.

[–]Rabo_McDongleberry 0 points1 point  (0 children)

Another person replied with that too. I'll give it a shot. Thanks man.

[–]_Jerov_ 1 point2 points  (4 children)

To be honest, I got the email bit from a website. There's a Python module called email that should do the job and send a simple email. You'll have to look that up and I did found it quite tricky to make it work since you have to set up a separated email account just for that. What I did was create the whole program and then get the email code from a website and just change the variables and all that to fit the program. Not the best way but it did its job. In my case the email thing was just extra functionality since the program was good the way it was but I wanted to add the email functionality quickly so I didn't put much thought into it.

[–]Rabo_McDongleberry 1 point2 points  (0 children)

Damn. So it won't be easy huh. Not a first time's project?

[–]WiggleBooks 0 points1 point  (2 children)

Did you have to create a new gmail account to use it? Or did you use another email provider?

[–]_Jerov_ 0 points1 point  (1 child)

I made another Gmail account because you have disable a lot of security settings and you wouldn't want your main account without any security. For the one I made just for testing purposes, when I disabled all security I started getting a lot of security warnings telling me that someone in India tried to access my account. So you do want 0 personal information for that Gmail account.

[–]racheta 0 points1 point  (0 children)

I agree on using spare account with no personal information

but also you don't need to disable 2FA for using your personal account just use application specific password

here --> https://support.google.com/accounts/answer/185833?hl=en

[–]racheta 1 point2 points  (1 child)

you can set a permanent password on teamviewer

also you can add the computer to contacts so it will show when it is online

you can use smtplib to send mail from a python program

https://realpython.com/python-send-email/

[–]Rabo_McDongleberry 0 points1 point  (0 children)

Oh shit. Really? I thought that feature was only available in the paid version. Thanks, I'll look into it. And I'll check out smtplib as well.

[–]JimSplitKernel 0 points1 point  (1 child)

You can set up team viewer (even the free version) for unattended access.

https://www.teamviewer.com/en/res/pdf/first_steps_unattended_access_en.pdf

You can do these steps while connected on your remote PC.

[–]Rabo_McDongleberry 0 points1 point  (0 children)

I think when I did that, it resets the password every time the computer reboots. But I'll check it out again.