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

celeryconfig.py #29556

Open
2 of 3 tasks
hswlxc opened this issue Jul 11, 2024 · 2 comments
Open
2 of 3 tasks

celeryconfig.py #29556

hswlxc opened this issue Jul 11, 2024 · 2 comments
Labels
change:backend Requires changing the backend

Comments

@hswlxc
Copy link

hswlxc commented Jul 11, 2024

Bug description

superset_config.py.zip
This is my profile, and according to this configuration, the email cannot be sent

How to reproduce the bug

image image

Screenshots/recordings

No response

Superset version

4.0.1

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@dosubot dosubot bot added the change:backend Requires changing the backend label Jul 11, 2024
Copy link

dosubot bot commented Jul 11, 2024

To resolve the issue where emails cannot be sent according to your configuration in superset_config.py while using Superset version 4.0.1 with Python 3.9 and Node 16, ensure that the email configuration settings in your superset_config.py are correctly set. Here is an example configuration:

# smtp server configuration
EMAIL_NOTIFICATIONS = True  # Enable email notifications
SMTP_HOST = "your_smtp_host"
SMTP_STARTTLS = True
SMTP_SSL = False
SMTP_USER = "your_smtp_user"
SMTP_PORT = 587  # or the port your SMTP server uses
SMTP_PASSWORD = "your_smtp_password"
SMTP_MAIL_FROM = "[email protected]"
SMTP_SSL_SERVER_AUTH = False
ENABLE_CHUNK_ENCODING = False

# Optional: Customize email headers
def email_header_mutator(msg, **kwargs):
    # Example: Add a custom header
    msg["X-Custom-Header"] = "CustomValue"
    return msg

EMAIL_HEADER_MUTATOR = email_header_mutator

Make sure to replace the placeholder values (your_smtp_host, your_smtp_user, your_smtp_password, and [email protected]) with your actual SMTP server details.

Additionally, ensure that EMAIL_NOTIFICATIONS is set to True to enable email sending.

The EMAIL_HEADER_MUTATOR function allows you to customize email headers if needed. This function is called within the send_email_smtp function to mutate the email message before sending it.

If you continue to experience issues, you can refer to the superset/reports/notifications/email.py file for more details on how email notifications are handled in Superset. This file includes the EmailNotification class, which is responsible for sending email notifications for report recipients. It uses the send_email_smtp function to send emails, and you can check the logs for any errors that might be raised during the email sending process [1][2].

To continue talking to Dosu, mention @dosu.

@rusackas
Copy link
Member

It might help if you can provide a more complete Issue title, and provide any errors (server side or client side) that you see. Most of us can't read the screenshots, so if you can help us understand what those illustrate, that'd be helpful. Lastly, it might help to throw your config file at the bots in the #ask-ai channel on slack to see if it can spot any errors or omissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change:backend Requires changing the backend
Projects
None yet
Development

No branches or pull requests

2 participants