User edit email fix

This commit is contained in:
Jan Broer
2015-08-02 21:43:33 +02:00
parent aef608aa10
commit 0b5b3b8424
3 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -324,16 +324,16 @@ def logout():
def send_to_kindle(book_id):
settings = ub.get_mail_settings()
if settings.get("mail_server", "mail.example.com") == "mail.example.com":
flash("please configure your email account settings first...", category="error")
flash("Please configure the SMTP email account first...", category="error")
elif current_user.kindle_mail:
x = helper.send_mail(book_id, current_user.kindle_mail)
if x:
flash("mail successfully send to %s" % current_user.kindle_mail, category="success")
flash("Mail successfully send to %s" % current_user.kindle_mail, category="success")
helper.update_download(book_id, int(current_user.id))
else:
flash("there was an error sending this book", category="error")
flash("There was an error sending this book", category="error")
else:
flash("please set a kindle mail first...", category="error")
flash("Please set a kindle mail first...", category="error")
return redirect(request.environ["HTTP_REFERER"])
@app.route("/shelf/add/<int:shelf_id>/<int:book_id>")