Bug description

Hello, I configure config.py to send email: EMAIL_NOTIFICATIONS = True # all the emails are sent using dryrun SMTP_HOST = "mailserver" SMTP_STARTTLS = True SMTP_SSL = False SMTP_USER = "" SMTP_PORT = 25 SMTP_PASSWORD = "" SMTP_MAIL_FROM = "noreply@test.fr"

If True creates a default SSL context with ssl.Purpose.CLIENT_AUTH using the

default system root CA certificates.

SMTP_SSL_SERVER_AUTH = False ENABLE_CHUNK_ENCODING = False

I try to plan pdf report et send by email, it doesn't work and no errors in execution log.

I try to send test mail on the superset server by python comand: import smtplib server = smtplib.SMTP('mailserver', 25) server.starttls() server.sendmail('noreply@test.fr','my adress mail','test')

It work !

Can you help me ?

Thank you

Screenshots/recordings

No response

Superset version

master / latest-dev

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.

Comment From: dosubot[bot]

I found a similar closed issue where the problem was resolved by adding a Celery beat worker and adjusting the superset-config.py file. Here are the key changes that were made:

  1. Adding a Celery Beat Worker: This involves configuring a container to run the Celery beat process. Here's an example configuration: ```yaml containers:
  2. name: superset image: "apache/superset:latest" imagePullPolicy: IfNotPresent command: ["/bin/sh","-c",". /app/pythonpath/superset_bootstrap.sh; celery --app=superset.tasks.celery_app:app beat"] ```

  3. Updating the CeleryConfig Class: Modify your superset-config.py to include the necessary Celery configurations: ```python class CeleryConfig(object): BROKER_URL = f"redis://default:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" CELERY_IMPORTS = ('superset.sql_lab','superset.tasks', ) CELERY_RESULT_BACKEND = f"redis://default:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" CELERYD_PREFETCH_MULTIPLIER = 10 CELERY_ACKS_LATE = True CELERY_TASK_PROTOCOL = 1 CELERY_LOG_LEVEL = 'DEBUG' CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}, 'sql_lab.get_sql_results': {'rate_limit': '100/s',}, 'email_reports.send': { 'rate_limit': '1/s', 'time_limit': 600, 'soft_time_limit': 600, 'ignore_result': True,},} CELERYBEAT_SCHEDULE = { 'email_reports.schedule_hourly': { 'task': 'email_reports.schedule_hourly', 'schedule': crontab(minute=1, hour=''), }, 'alerts.schedule_check': { 'task': 'alerts.schedule_check', 'schedule': crontab(minute='', hour=''), }, 'reports.scheduler': { 'task': 'reports.scheduler', 'schedule': crontab(minute='', hour=''), }, 'reports.prune_log': { 'task': 'reports.prune_log', 'schedule': crontab(minute=0, hour=0), }, 'cache-warmup-hourly': { 'task': 'cache-warmup', 'schedule': crontab(minute=0, hour=''), #hourly 'kwargs': { 'strategy_name': 'top_n_dashboards', 'top_n': 10, 'since': '7 days ago', },},}

CELERY_CONFIG = CeleryConfig RESULTS_BACKEND = RedisCache( host=env('REDIS_HOST'), port=env('REDIS_PORT'), password=env('REDIS_PASSWORD'), key_prefix='superset_results' )

# Adding email report function FEATURE_FLAGS = { "ALERT_REPORTS": True, "DASHBOARD_NATIVE_FILTERS": True, "DASHBOARD_CROSS_FILTERS": True, "ENABLE_TEMPLATE_PROCESSING": True, "ENABLE_SCHEDULED_EMAIL_REPORTS": True, "EMAIL_NOTIFICATIONS": True } SIP_15_ENABLED = True

ALERT_REPORTS_NOTIFICATION_DRY_RUN = False

EMAIL_NOTIFICATIONS = True

SCREENSHOT_LOCATE_WAIT = 100 SCREENSHOT_LOAD_WAIT = 600

# Email configuration SMTP_HOST = "airlapp.isb.lsy.fra.dlh.de" #change to your host SMTP_STARTTLS = False SMTP_SSL = False SMTP_USER = "" SMTP_PORT = XXX # your port eg. 587 SMTP_PASSWORD = "" SMTP_MAIL_FROM = " Superset | Reporting Team XX@YY.com"

WEBDRIVER_BASEURL = "http://superset.:8088/" WEBDRIVER_BASEURL_USER_FRIENDLY = WEBDRIVER_BASEURL ```

  1. Ensuring SIP_15_ENABLED = True: This setting should be enabled, and SMTP_USER and SMTP_PASSWORD should be left empty if not required by your SMTP server.

Additionally, ensure that the ALERT_REPORTS_NOTIFICATION_DRY_RUN is set to False in your worker environment to allow actual email sending [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Comment From: rusackas

I'm not sure I understand the issue based on the title and description. Can you elaborate a bit please?

Comment From: rusackas

We haven't heard back, so I'll close this as inactionable/not planned.