Minor fixes. Cleaned up logging and send_email test mode.
This commit is contained in:
@@ -24,7 +24,7 @@ router = APIRouter()
|
||||
async def util_email_send_obj(
|
||||
email_send_obj: Email_Send_Base,
|
||||
|
||||
test: bool = False,
|
||||
test: Optional[bool] = False,
|
||||
|
||||
return_obj: bool = True,
|
||||
|
||||
@@ -56,7 +56,18 @@ async def util_email_send_obj(
|
||||
|
||||
# NOTE: This all works, but I think it could be done better???
|
||||
|
||||
if send_email(from_email=from_email, from_name=from_name, to_email=to_email, to_name=to_name, bcc_email=bcc_email, bcc_name=bcc_name, subject=subject, body_text=body_text, body_html=body_html, test=test):
|
||||
if send_email(
|
||||
from_email = from_email,
|
||||
from_name = from_name,
|
||||
to_email = to_email,
|
||||
to_name = to_name,
|
||||
bcc_email = bcc_email,
|
||||
bcc_name = bcc_name,
|
||||
subject = subject,
|
||||
body_text = body_text,
|
||||
body_html = body_html,
|
||||
test = test
|
||||
):
|
||||
status_code = 200
|
||||
status_message = f'Email was sent to <{to_email}>.'
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user