Skip to content

Commit

Permalink
Merge pull request #1334 from getredash/add-yaxis-scales
Browse files Browse the repository at this point in the history
Change: allow specifying recipient address when sending email test message
  • Loading branch information
arikfr authored Oct 9, 2016
2 parents 2135dfd + 8e9e288 commit 015b1dc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,16 @@ def check_settings():
for name, item in settings.all_settings().iteritems():
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 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__':
Expand Down

0 comments on commit 015b1dc

Please sign in to comment.