Last active
August 29, 2015 14:18
-
-
Save sa2ajj/13f86d3437eb9109af8c to your computer and use it in GitHub Desktop.
Simple test plain SMTP + STARTTLS + AUTH works
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python -tt | |
from smtplib import SMTP | |
from getpass import getpass | |
def main(): | |
""" | |
entry point | |
""" | |
server = SMTP(HOST) | |
server.starttls() | |
print server.ehlo(OTHER_HOST) | |
user = raw_input('user: ') | |
password = getpass('password: ') | |
print server.login(user, password) | |
server.close() | |
if __name__ == '__main__': | |
main() | |
# vim:ts=4:sw=4:et:tw=80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment