库:pyqt5 smtplib
邮箱应开启smtp,pop3
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '注册.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from tkinter import dialog
from typing_extensions import Self
from PyQt5 import QtCore, QtGui, QtWidgets
import smtplib
import welcome
from email.mime.text import MIMEText
from email.utils import formataddr
import random
my_sender='logic_1012@163.com'
my_pass = 'KJYXLYHHCBRKUYOA'
my_user=' '
Password=random.randint(100000,999999)
Password=str(Password)
# Password=random.randint(100000,999999)
user_pass=""
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(800, 600)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(60, 20, 101, 51))
font = QtGui.QFont()
font.setFamily("Agency FB")
font.setPointSize(20)
self.label.setFont(font)
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(self.centralwidget)
self.label_2.setGeometry(QtCore.QRect(110, 130, 91, 51))
font = QtGui.QFont()
font.setFamily("Agency FB")
font.setPointSize(14)
self.lab