mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
Merge pull request #1334 from getredash/add-yaxis-scales
Change: allow specifying recipient address when sending email test message
This commit is contained in:
commit
015b1dc8fd
10
manage.py
10
manage.py
@ -47,12 +47,16 @@ def check_settings():
|
|||||||
for name, item in settings.all_settings().iteritems():
|
for name, item in settings.all_settings().iteritems():
|
||||||
print "{} = {}".format(name, item)
|
print "{} = {}".format(name, item)
|
||||||
|
|
||||||
@manager.command
|
|
||||||
def send_test_mail():
|
@manager.option('email', default=None, help="Email address to send test message to (default: the address you defined in MAIL_DEFAULT_SENDER)")
|
||||||
|
def send_test_mail(email=None):
|
||||||
from redash import mail
|
from redash import mail
|
||||||
from flask_mail import Message
|
from flask_mail import Message
|
||||||
|
|
||||||
mail.send(Message(subject="Test Message from re:dash", recipients=[settings.MAIL_DEFAULT_SENDER], body="Test message."))
|
if email is None:
|
||||||
|
email = settings.MAIL_DEFAULT_SENDER
|
||||||
|
|
||||||
|
mail.send(Message(subject="Test Message from re:dash", recipients=[email], body="Test message."))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user