Better parameterize ping function, bug fix

Passing timeout and retry count to ping function. Fixed a bug where
email could be sent even if the email notification was turned off in the
config. Echoing timeout and retry count in the HTML output.