修复
This commit is contained in:
@@ -2,7 +2,7 @@ from flask import Flask, request, jsonify, render_template
|
|||||||
from .config import Config
|
from .config import Config
|
||||||
from .utils import get_latest_emails, get_latest_email_with_code, add_allowed_domain, remove_allowed_domain, get_allowed_domains, get_allowed_domains_with_time
|
from .utils import get_latest_emails, get_latest_email_with_code, add_allowed_domain, remove_allowed_domain, get_allowed_domains, get_allowed_domains_with_time
|
||||||
import redis
|
import redis
|
||||||
from .smtp_server import start_smtp_server
|
import smtp_server
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
def create_app():
|
def create_app():
|
||||||
@@ -66,7 +66,7 @@ def create_app():
|
|||||||
return render_template('email_detail.html', email=email)
|
return render_template('email_detail.html', email=email)
|
||||||
return "邮件不存在", 404
|
return "邮件不存在", 404
|
||||||
|
|
||||||
smtp_thread = threading.Thread(target=start_smtp_server, args=(app,))
|
smtp_thread = threading.Thread(target=smtp_server.start_smtp_server, args=(app,))
|
||||||
smtp_thread.daemon = True
|
smtp_thread.daemon = True
|
||||||
smtp_thread.start()
|
smtp_thread.start()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user