Browsed by
Month: September 2015

IPaddress change alert script

IPaddress change alert script

My old ISP use to change my external IP address all the time and to keep my DNS name on track I wrote this script: #!/usr/bin/python import smtplib import urllib2 import time import sys def send_email(): try: server = smtplib.SMTP(‘smtp’, 587)#smtp address and port number server.starttls() #Next, log in to the server server.login(“smtp username”, “password”)#username and password for smtp #def emailSend(ipaddress): to_addr=”your email address” subject=”IPaddress is changed” message=”this is from your webserver:” + html from_addr=”you@gmail.com” header = ‘From: %s\n’ %…

Read More Read More