You can use the urllib library and check the response code. I attached example.
I am using version 3.6.6 of python, although it is also compatible for later versions.
import urllib
import urllib.request
import logging
logging.basicConfig(level=logging.DEBUG)
logging.basicConfig(level=logging.INFO)
#La url del fichero que quieres descargar
url = 'https://cdn4.iconfinder.com/data/icons/new-google-logo-2015/400/new-google-favicon-512.png'
try:
response = urllib.request.urlopen(url)
code = response.getcode()
if (code == 200):
logging.info('El fichero se ha descargado correctamente')
else:
print("Algo ha salido mal, no se ha descargado el fichero.")
except:
logging.debug("Algo ha salido mal")
To send messages by e-mail you can use this Guide :
And you simply send it after the 200 code.
I hope it helps! :)