Ejemplo n.º 1
0
def gulesider_sms_mail_noinfo( headers ):
    global sms_sanity_countdown
    from gulesider import send_sms
    message = "New mail has arrived in inbox"
    if sms_sanity_countdown <= 0:
        print >> sys.stderr, "[gulesider_sms_mail_noinfo] will not send SMS '%s', too many sent already" % message
    else:
        sms_sanity_countdown -= 1
        print >> sys.stderr, "[gulesider_sms_mail_noinfo] sending SMS '%s', left until restart required: %d" % (message, sms_sanity_countdown)
        send_sms( message )
Ejemplo n.º 2
0
def gulesider_sms_mail( headers ):
    global sms_sanity_countdown
    from gulesider import send_sms
    message = pretty_stringify_mail( headers )
    if sms_sanity_countdown <= 0:
        print >> sys.stderr, "[gulesider_sms_mail] will not send SMS '%s', too many sent already" % message
    else:
        sms_sanity_countdown -= 1
        print >> sys.stderr, "[gulesider_sms_mail] sending SMS '%s', left until restart required: %d" % (message, sms_sanity_countdown)
        send_sms( message )