import smtplib


def connect_smtp(user, password, server="smtp.office365.com", port=587):
    """Make a SMTP connection"""
    server = smtplib.SMTP(server, port)
    server.ehlo()
    server.starttls()
    server.login(user, password)
    return server