Ejemplo n.º 1
0
def aspsms(params):

    from aspsms import send_aspsms

    logger.info('cli sends aspsms')
    response = send_aspsms(params.to, params.message, originator=params.origin, flashing=params.flashing, maxchars=params.maxchars)
    if response == True:
        parser.exit(status=0, message='success, aspsms sent\n')
    else:
        parser.exit(status=-1, message='fail: %s\n' %(response))
Ejemplo n.º 2
0
    send_mail(['*****@*****.**'], test_message, subject='test')

    logger.info('Sending new mail with all parameters')
    send_mail(
        ['*****@*****.**', '*****@*****.**'],
        'Have fun with the readme!',
        subject='mail to many recipients',
        subjecttag='Information',
        subjectdate=True,
        cc=['*****@*****.**', '*****@*****.**'],
        bcc=['*****@*****.**'],
        sender='Sample User <*****@*****.**>',
        footer='Fnord Industries 2000\nSky\'s-the-limit-lane 23\n23425 Fnord',
        files=['README.markdown']
        )

    logger.info('Sending new test aspsms')
    send_aspsms(['00991234567890'], test_message)

    logger.info('Sending new aspsms with all parameters')
    send_aspsms(
        ['00991234567890', '00119876543210'],
        'This is a very important message',
        originator='SampleUser',
        flashing=True,
        maxchars=320
        )

    logger.info('Sending new test tweet')
    send_tweet(test_message, mention=['mossfromIT'])