|
@@ -9,7 +9,7 @@ from app.config import MAILBOX_SECRET
|
|
|
from app.config import URL
|
|
|
from app.dashboard.base import dashboard_bp
|
|
|
from app.email_utils import can_be_used_as_personal_email, email_already_used
|
|
|
-from app.email_utils import send_email, render
|
|
|
+from app.email_utils import mailbox_already_used, render, send_email
|
|
|
from app.extensions import db
|
|
|
from app.log import LOG
|
|
|
from app.models import GenEmail, DeletedAlias
|
|
@@ -48,7 +48,7 @@ def mailbox_detail_route(mailbox_id):
|
|
|
if new_email != mailbox.email and not pending_email:
|
|
|
# check if this email is not already used
|
|
|
if (
|
|
|
- email_already_used(new_email)
|
|
|
+ mailbox_already_used(new_email, current_user)
|
|
|
or GenEmail.get_by(email=new_email)
|
|
|
or DeletedAlias.get_by(email=new_email)
|
|
|
):
|