Ejemplo n.º 1
0
    def __init__(self):
        account = ""
        passwd = ""

        fp = open("/home/newmoni/workspace/buzzni_lunchbot/sender_account.secret", "r")
        account, passwd = fp.read().split(",")

        self.mail = Sender("gmail", account, passwd)
Ejemplo n.º 2
0
class GmailConnector(object):
    def __init__(self):
        account = ""
        passwd = ""

        fp = open("/home/newmoni/workspace/buzzni_vocbot/sender_account.secret", "r")
        account, passwd = fp.read().split(",")

        self.mail = Sender("gmail", account, passwd)

    def send(self, targets=[], content=""):
        """ type : pre, result
        """
        title = "%s 버즈니 VOC리포트" % (date.today())

        return self.mail.send(targets, title, content)