本文整理汇总了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"