Want Windows to email you when someone logs into your Computer?

Do you dislike it that someone uses your computer in your absence? Well here's something you might just like. Now you can have Windows email you everytime someone logs into your computer.



SendEmail against the Task Scheduler Email Feature


The Task Scheduler includes a send an email option. Unfortunately, this won’t work properly for most users – if you have an SMTP server that requires authentication, the authentication details will have to be the same as the Windows user account’s details. The built-in emailing feature may be useful for users with SMTP servers running on their local computers, but it won’t work properly if you use Gmail or another third-party email service.
Instead, it is recommended to download SendEmail, a free tool for sending emails from the command line. With SendEmail, we can write a single command that will send out an email. SendEmail supports authentication, so we can easily send email from Gmail’s SMTP server or any other server that requires authentication.

Creating a Task


First, launch the task scheduler by typing Task Scheduler into your Start menu and pressing Enter.

image
Click Create Task in the sidebar.
image
On the General pane, provide a name and description for the task. You should also select the Run whether user is logged on or not option.
image
On the Triggers tab, create a new trigger which will begin the task at log on for any user.
image
On the Actions tab, create a new action that runs the sendemail.exe application. Add arguments like the following:
-f from@gmail.com -t to@gmail.com -u Someone Logged Into Your Computer -m Someone just logged into your computer! -s smtp.gmail.com:587 -xu from@gmail.com -xp password -o tls=yes
The above arguments will send an email from from@gmail.com to to@gmail.com. The email’s subject is Someone Logged Into Your Computer and its message body is Someone just logged into your computer!

Note: The server information is smtp.gmail.com with port 587 – if you’re using a different SMTP server provider, you’ll have to change this. You’ll also have to replace password with your own password.
image
Also note that you can select the Send an email action here if you have access to an SMTP server that doesn’t require authentication, such as an email server running on your local computer.
On the Conditions tab, uncheck Start the task only if the computer is on AC power option or you won’t get emails if you own a laptop and it’s unplugged- you don't want that.
image
Click OK and save your task. You should now receive email notifications whenever someone logs into your computer.
image
You can use similar sendemail.exe commands attached to other trigger events to send other types of automatic emails. For example, you could send an automatic email on a schedule or in response to a certain event code in your computer’s Windows event log.

Comments

Popular posts from this blog

Matrix Falling Code Effect

The Windows 10 Fall Creator's Update: What's new?

Why should you Disable 2.4 GHz Wi-Fi on your Network and How