Esempio n. 1
0
File: invite.py Progetto: blanu/Dust
def gotInvite(invite):
  ps=input("Print or Save [P/s]?")
  passwd=input("Encrypt invite with password: "******"Save invite to filename: ").strip()
    if filename!='':
      f=open(filename, 'wb')
      f.write(packet.packet)
      f.close()
  else:
    print()
    print(encode(packet.packet))
    print()

  done.set()
Esempio n. 2
0
def gotInvite(invite):
    ps = input("Print or Save [P/s]?")
    passwd = input("Encrypt invite with password: "******"Save invite to filename: ").strip()
        if filename != '':
            f = open(filename, 'wb')
            f.write(packet.packet)
            f.close()
    else:
        print()
        print(encode(packet.packet))
        print()

    done.set()
    def gotInvite(self, invite):
        time.sleep(1)
        print()
        ps = input("Print, Save, or Email [P/s/e]? ")
        passwd = input("Encrypt invite with password: "******"Save invite to filename: ").strip()
            if filename != '':
                f = open(filename, 'wb')
                f.write(packet.packet)
                f.close()
        elif ps == 'e':
            frm = input("Your email: ")
            to = input("Recipient email: ")
            name = input("Your name on DustMail: ")

            body = """
      You have been invited to communicate with %s via DustMail.
      Use the following invite code: %s
      """ % (name, encode(packet.packet))

            emailConfig = YamlMap('config/emailServer.yaml')
            try:
                smtpHost = emailConfig['smtpHost']
            except:
                smtpHost = input("SMTP Host: ")
                emailConfig['smtpHost'] = smtpHost

            notifier = Notifier(frm)
            notifier.notify(to, 'DustMail Invite', body)
        else:
            print()
            print(encode(packet.packet))
            print()

        self.commandDone.set()
Esempio n. 4
0
File: reader.py Progetto: blanu/Dust
  def gotInvite(self, invite):
    time.sleep(1)
    print()
    ps=input("Print, Save, or Email [P/s/e]? ")
    passwd=input("Encrypt invite with password: "******"Save invite to filename: ").strip()
      if filename!='':
        f=open(filename, 'wb')
        f.write(packet.packet)
        f.close()
    elif ps=='e':
      frm=input("Your email: ")
      to=input("Recipient email: ")
      name=input("Your name on DustMail: ")

      body="""
      You have been invited to communicate with %s via DustMail.
      Use the following invite code: %s
      """ % (name, encode(packet.packet))

      emailConfig=YamlMap('config/emailServer.yaml')
      try:
        smtpHost=emailConfig['smtpHost']
      except:
        smtpHost=input("SMTP Host: ")
        emailConfig['smtpHost']=smtpHost

      notifier=Notifier(frm)
      notifier.notify(to, 'DustMail Invite', body)
    else:
      print()
      print(encode(packet.packet))
      print()

    self.commandDone.set()