This commit is contained in:
huangzhenpc
2025-03-05 13:48:45 +08:00
parent 8855475bbb
commit 1ba7434348
2 changed files with 46 additions and 4 deletions

View File

@@ -1,6 +1,9 @@
from flask import Flask, request, jsonify, render_template
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,
get_all_emails)
import redis
def create_app():
@@ -55,8 +58,7 @@ def create_app():
@app.route('/web/list')
def list_emails_page():
try:
# 不指定 recipient获取所有邮件
emails = get_latest_emails(recipient=None, count=50)
emails = get_all_emails(count=50)
return render_template('email_list.html', emails=emails)
except Exception as e:
app.logger.error(f"Error in list_emails_page: {str(e)}")