class Notification(object): def __init__(self, *args, **kwargs): super(Notification, self).__init__() self._sender = SendCloud().email def send_wechat_notification(self): self._sender.send_email('*****@*****.**', subject='微信通知', html='有人给你的微信公众号留言了,快点去看看啊。')
#!/usr/bin/python #-*-coding: utf8-*- from sendcloud import SendCloud if __name__ == "__main__": sc = SendCloud() kwargs = {"api_user": "******", "api_key": "api_key", "days": 20} print sc.work("mailstats", **kwargs)
def __init__(self, *args, **kwargs): super(Notification, self).__init__() self._sender = SendCloud().email