You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/07/27 16:40:19 UTC
[GitHub] [superset] DwijadasDey opened a new issue #15911: Email Notification: Connection unexpectedly closed
DwijadasDey opened a new issue #15911:
URL: https://github.com/apache/superset/issues/15911
Hi
I am unable to send email notification using following settings configured in **superset_config.py**
```
# Email configuration
SMTP_HOST = "smtp-mail.outlook.com" #change to your host
SMTP_STARTTLS = True
SMTP_SSL = False
SMTP_USER = "my_email@outlook.com"
SMTP_PORT = 587 # your port eg. 587
SMTP_PASSWORD = "Passw0rd!23"
SMTP_MAIL_FROM = "my_email@outlook.com"
```
The log for the alert contains following lines
```
8eb46e 2021-07-27 04:34:00 pm 2021-07-27 04:34:00 pm 00:00:10.32 Connection unexpectedly closed
8eb46e 2021-07-27 04:34:00 pm 2021-07-27 04:34:00 pm 00:00:00.19 Alert query returned more then one row. 2 rows returned
...
...
```
However when i test the above SMTP settings using [https://www.gmass.co/smtp-test#](https://www.gmass.co/smtp-test#) , everything looks fine and the sender is able to send the mail.
**Connected to smtp://smtp-mail.outlook.com:587/?starttls=always**
Any clues ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] caoquyvu commented on issue #15911: Email Notification: Connection unexpectedly closed
Posted by GitBox <gi...@apache.org>.
caoquyvu commented on issue #15911:
URL: https://github.com/apache/superset/issues/15911#issuecomment-927585452
@DwijadasDey I just fixed it with run python code from superset, and check what is wrong with my Superset Config
Superset is bad when telling us what is wrong with config,
import smtplib
smtp_host = config["SMTP_HOST"]
smtp_port = config["SMTP_PORT"]
smtp_user = config["SMTP_USER"]
smtp_password = config["SMTP_PASSWORD"]
smtp_starttls = config["SMTP_STARTTLS"]
smtp_ssl = config["SMTP_SSL"]
if not dryrun:
smtp = (
smtplib.SMTP_SSL(smtp_host, smtp_port)
if smtp_ssl
else smtplib.SMTP(smtp_host, smtp_port)
)
if smtp_starttls:
smtp.starttls()
if smtp_user and smtp_password:
smtp.login(smtp_user, smtp_password)
logger.debug("Sent an email to %s", str(e_to))
smtp.sendmail(e_from, e_to, mime_msg.as_string())
smtp.quit()
else:
logger.info("Dryrun enabled, email notification content is below:")
logger.info(mime_msg.as_string())
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] caoquyvu commented on issue #15911: Email Notification: Connection unexpectedly closed
Posted by GitBox <gi...@apache.org>.
caoquyvu commented on issue #15911:
URL: https://github.com/apache/superset/issues/15911#issuecomment-926413568
Did u resolved thiss problems?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] DwijadasDey edited a comment on issue #15911: Email Notification: Connection unexpectedly closed
Posted by GitBox <gi...@apache.org>.
DwijadasDey edited a comment on issue #15911:
URL: https://github.com/apache/superset/issues/15911#issuecomment-927023941
@caoquyvu
This time i tried using gmail SMTP server with the following settings to make it work.
https://accounts.google.com/DisplayUnlockCaptcha
https://myaccount.google.com/u/0/lesssecureapps
### Updated SMTP Settings
EMAIL_NOTIFICATIONS = True
SMTP_HOST = "smtp.gmail.com" #change to your host
SMTP_STARTTLS = True
SMTP_SSL = True
SMTP_USER = "my_email_id@gmail.com"
SMTP_PORT = 587 # your port eg. 587
SMTP_PASSWORD = "Passw0rd!23"
SMTP_MAIL_FROM = "no-reply@some-email.com"
![Selection_001](https://user-images.githubusercontent.com/12824049/134762486-02054c4b-8565-46b6-8778-95980c89dc08.png)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] DwijadasDey commented on issue #15911: Email Notification: Connection unexpectedly closed
Posted by GitBox <gi...@apache.org>.
DwijadasDey commented on issue #15911:
URL: https://github.com/apache/superset/issues/15911#issuecomment-927023941
@caoquyvu
This time i tried using gmail SMTP server with the following gmail settings to make it work.
https://accounts.google.com/DisplayUnlockCaptcha
https://myaccount.google.com/u/0/lesssecureapps
### Updated SMTP Settings
EMAIL_NOTIFICATIONS = True
SMTP_HOST = "smtp.gmail.com" #change to your host
SMTP_STARTTLS = True
SMTP_SSL = True
SMTP_USER = "my_email_id@gmail.com"
SMTP_PORT = 587 # your port eg. 587
SMTP_PASSWORD = "Passw0rd!23"
SMTP_MAIL_FROM = "no-reply@some-email.com"
![Selection_001](https://user-images.githubusercontent.com/12824049/134762486-02054c4b-8565-46b6-8778-95980c89dc08.png)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] DwijadasDey commented on issue #15911: Email Notification: Connection unexpectedly closed
Posted by GitBox <gi...@apache.org>.
DwijadasDey commented on issue #15911:
URL: https://github.com/apache/superset/issues/15911#issuecomment-926730257
@caoquyvu
Still not. I will look into the issue again and will let you know if i can make it work !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org