Skip to content

Conversation

ihmily
Copy link
Contributor

@ihmily ihmily commented Sep 26, 2024

In the code, there is only this line:

response = message.send(to=email_to, smtp=smtp_options)
logging.info(f"send email result: {response}")

Without any log configuration (such as setting the log level, format, and handler), in most cases, this log message will not be displayed on the console, nor will it be automatically recorded in a log file.
https://github.com/fastapi/full-stack-fastapi-template/blob/451c656fb052c9ff00e0da507a42d549c0f184cb/backend/app/utils.py#L50C1-L51C51

I can't see the log <emails.backend.SMTPResponse status_code=501 status_text=b'Mail from address must be same as authorization user.'>

@ihmily ihmily closed this Sep 26, 2024
@ihmily ihmily deleted the fix-print-log branch September 26, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant