Send mail to 127.0.0.1 instead of localhost
Updated fromatting to be pep08 conform,