Beispiel #1
0
class EmailTasks(QtGui.QDialog):
	"""
	EmailTasks main popup window.
	"""
	def __init__(self):
		# Setup the PyQt window
		QtGui.QDialog.__init__(self)
		self.ui = Ui_Dialog()
		self.ui.setupUi(self)

	# As the text is changed, update the global variable
	def on_lineEdit_textChanged(self):
		global mailaddress
		mailaddress = self.ui.lineEdit.text()

	# Check the mail format, maybe call bad mail popup,
	# if not then send the message and close the dialog
	def on_pushButton_released(self):
		try:
			SendEmail(str(mailaddress))
			self.close()
		except NameError:
			callPopup()
		except smtplib.SMTPRecipientsRefused: # Google will do address verification
			callPopup()
Beispiel #2
0
	def __init__(self):
		# Setup the PyQt window
		QtGui.QDialog.__init__(self)
		self.ui = Ui_Dialog()
		self.ui.setupUi(self)