Пример #1
0
 def __init__(self, pa, parent):
     QDialog.__init__(self, parent)
     TE_Dialog.__init__(self)
     self.setupUi(self)
     opts = smtp_prefs().parse()
     self.test_func = parent.test_email_settings
     self.test_button.clicked.connect(self.test)
     self.from_.setText(unicode(self.from_.text())%opts.from_)
     if pa:
         self.to.setText(pa)
     if opts.relay_host:
         tmp_password=''
         if opts.relay_prompt:
             header=opts.relay_username+'@'+opts.relay_host
             tmp_password, ok = QInputDialog.getText(self,
                 header,
                 _('Password:'******''
             else:
                 conf = smtp_prefs()
                 conf.set('relay_password', hexlify(str(tmp_password).encode('utf-8')))
                 tmp_password='******'
         else:
             tmp_password=unhexlify(opts.relay_password).decode('utf-8')
         self.label.setText(_('Using: %(un)s:%(pw)s@%(host)s:%(port)s and %(enc)s encryption')%
                 dict(un=opts.relay_username, pw=tmp_password,
                     host=opts.relay_host, port=opts.relay_port, enc=opts.encryption))
Пример #2
0
 def __init__(self, pa, parent):
     QDialog.__init__(self, parent)
     TE_Dialog.__init__(self)
     self.setupUi(self)
     opts = smtp_prefs().parse()
     self.test_func = parent.test_email_settings
     self.test_button.clicked.connect(self.test)
     self.from_.setText(unicode(self.from_.text())%opts.from_)
     if pa:
         self.to.setText(pa)
     if opts.relay_host:
         self.label.setText(_('Using: %(un)s:%(pw)s@%(host)s:%(port)s and %(enc)s encryption')%
                 dict(un=opts.relay_username, pw=unhexlify(opts.relay_password).decode('utf-8'),
                     host=opts.relay_host, port=opts.relay_port, enc=opts.encryption))
Пример #3
0
 def __init__(self, pa, parent):
     QDialog.__init__(self, parent)
     TE_Dialog.__init__(self)
     self.setupUi(self)
     opts = smtp_prefs().parse()
     self.test_func = parent.test_email_settings
     self.test_button.clicked.connect(self.test)
     self.from_.setText(unicode(self.from_.text())%opts.from_)
     if pa:
         self.to.setText(pa)
     if opts.relay_host:
         self.label.setText(_('Using: %(un)s:%(pw)s@%(host)s:%(port)s and %(enc)s encryption')%
                 dict(un=opts.relay_username, pw=unhexlify(opts.relay_password),
                     host=opts.relay_host, port=opts.relay_port, enc=opts.encryption))
Пример #4
0
 def __init__(self, pa, parent):
     QDialog.__init__(self, parent)
     TE_Dialog.__init__(self)
     self.setupUi(self)
     opts = smtp_prefs().parse()
     self.test_func = parent.test_email_settings
     self.test_button.clicked.connect(self.test)
     self.from_.setText(unicode(self.from_.text()) % opts.from_)
     if pa:
         self.to.setText(pa)
     if opts.relay_host:
         tmp_password = ''
         if opts.relay_prompt:
             header = opts.relay_username + '@' + opts.relay_host
             tmp_password, ok = QInputDialog.getText(
                 self,
                 header,
                 _('Password:'******''
             else:
                 conf = smtp_prefs()
                 conf.set('relay_password',
                          hexlify(str(tmp_password).encode('utf-8')))
                 tmp_password = '******'
         else:
             tmp_password = unhexlify(opts.relay_password).decode('utf-8')
         self.label.setText(
             _('Using: %(un)s:%(pw)s@%(host)s:%(port)s and %(enc)s encryption'
               ) % dict(un=opts.relay_username,
                        pw=tmp_password,
                        host=opts.relay_host,
                        port=opts.relay_port,
                        enc=opts.encryption))