There are a few things you can do to get email notifications whenever someone logs into your computer. You can set up a notification center on your computer, or you can use a third-party program to do this for you. If you have a notification center set up on your computer, you can get email notifications whenever someone logs into your computer. To set up a notification center on your computer, follow these steps:
- Open the Start menu and type “notification center.” This will open the notification center in Windows 10.
- In the notification center, click on the “Notifications” tab. This will show all of the notifications that are sent to your computer from different sources.
- Click on the “Email Notifications” button next to the name of the person who logged into your computer. This will open an email window with all of the information that was sent to your computer from that person.
Do you have a computer that you don’t want other people accessing – perhaps a server? You can have Windows email you whenever someone logs into your computer (assuming it’s connected to the Internet), giving you peace of mind.
We’ll be using the Windows Task Scheduler for this – it can send emails in response to a variety of events. The Task Scheduler’s built-in email feature isn’t as flexible as we’d like, so we’ll be using another tool.
SendEmail vs. 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, 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.
Click the Create Task link in the sidebar.
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.
On the Triggers tab, create a new trigger that begins the task at log on for any user.
On the Actions tab, create a new action that runs the sendemail.exe application. Add arguments like the following:
The above arguments sends 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!”. 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.
(Note that you can also 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 your computer is a laptop and it’s unplugged.
Click the OK button and save your task. You should now receive email notifications whenever someone logs into your computer.
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.