Ping Hosts in IP-range, Outputs result to Console and Sends Status-Changes v1

My first script ))))

This script pings hosts in defined IP-range, and sends mail if host becomes unreachable or online.
It runs in an indefinite loop. Each loop run-duration depends on accessibility of all hosts, 70 hosts takes approximately 3 minutes to run. 

1. Make sure you change -SmtpServer in script to yours, use search, two variables to change.
2. Make sure you have file mailto.txt in the same directory with script. It contains list of mail addresses to notify.

Sorry for bad formatting. 

Your are mostly welcome with your comments, suggestions, corrections, critics )))))))

*Updates
- Ping output to email added
- removed extra code 
- variables renamed 
- doesn't send initial mail (only if host status changes) 

Anonymous