Reddit user ExpertBoat pointed me to the program contacam:
Supported from Windows Vista up to Windows 10
This Video Surveillance and Live Webcam software for Windows is extremely easy on system resources, and does not contain unnecessary bloat.
Motion detection actions like sending email with attached movement file or running any external program
All the ...