Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prints logs when mail are not initialized. Instead of doing nothing #14091

Closed
5 tasks done
milo-xiaomeng opened this issue Feb 20, 2025 · 0 comments
Closed
5 tasks done
Labels
💪 enhancement New feature or request

Comments

@milo-xiaomeng
Copy link

milo-xiaomeng commented Feb 20, 2025

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

I configured the email address in env but it did not take effect. What can I not see through the log

2. Additional context or comments

import logging
import time

import click
from celery import shared_task  # type: ignore
from flask import render_template

from extensions.ext_mail import mail


@shared_task(queue="mail")
def send_reset_password_mail_task(language: str, to: str, code: str):
    """
    Async Send reset password mail
    :param language: Language in which the email should be sent (e.g., 'en', 'zh')
    :param to: Recipient email address
    :param code: Reset password code
    """
    if not mail.is_inited():
        return
...

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
@milo-xiaomeng milo-xiaomeng changed the title Prints logs when messages are not initialized. Instead of doing nothing Prints logs when mail are not initialized. Instead of doing nothing Feb 20, 2025
@dosubot dosubot bot added the 🐞 bug Something isn't working label Feb 20, 2025
@crazywoola crazywoola added 💪 enhancement New feature or request and removed 🐞 bug Something isn't working labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants