Esempio n. 1
0
def main():
    options = parse_args()
    auth    = get_auth_info()
    session = RogersSession(auth.username, auth.password)
    info    = current_usage_info(session)
    msg     = draft_email(info, options.from_addr, options.recipients)

    smtplib.SMTP(options.smtp).sendmail(options.from_addr, options.recipients, msg.as_string())
Esempio n. 2
0
def main():
    options = parse_args()
    auth = get_auth_info()
    session = RogersSession(auth.username, auth.password)
    info = current_usage_info(session)
    msg = draft_email(info, options.from_addr, options.recipients)

    smtplib.SMTP(options.smtp).sendmail(options.from_addr, options.recipients,
                                        msg.as_string())
Esempio n. 3
0
def main():
    """ main """
    options = parse_arguments()
    authinfo = get_auth_info()
    session = RogersSession(authinfo.username, authinfo.password)
    csv_data = usage_history_csv(session)
    message = build_email(csv_data, options.recipients, options.from_addr)

    smtplib.SMTP(options.smtp).sendmail(options.from_addr, options.recipients,
                                        message.as_string())