本文整理匯總了Python中mailer.Message.CC方法的典型用法代碼示例。如果您正苦於以下問題:Python Message.CC方法的具體用法?Python Message.CC怎麽用?Python Message.CC使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類mailer.Message
的用法示例。
在下文中一共展示了Message.CC方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: process
# 需要導入模塊: from mailer import Message [as 別名]
# 或者: from mailer.Message import CC [as 別名]
if __name__ == "__main__":
# Use for debugging
# process()
while True:
now = datetime.now()
diff = (24 - now.hour) * 60 * 60 + (60 - now.minute) * 60 - now.second
for i in range(diff + 10 * 60 * 60, 0, -1):
print "\rSleeping for %s seconds..." % i,
sys.stdout.flush()
time.sleep(1)
print
message.Subject = ""
message.Html = ""
try:
process()
except KeyboardInterrupt:
sys.exit()
except:
try:
message.Subject = " InvoiceReport "
message.Subject += datetime.now().strftime("%d-%m")
message.To = "[email protected]"
message.CC = "[email protected]"
message.Html = "Invoice Script stopped Working"
print "something wrong with the script"
sender.send(message)
except:
print "Network problem"