def notify_about_new_password(model, password): """Sends email to user with his new password.""" message = make_password_message(model, password) emailutils.send(to=[model.email], subject="New password for Decapod", text_body=message)
def notify_user(token_id, email): url = CONF["api"]["reset_password_url"].format(reset_token=token_id) message = PASSWORD_MESSAGE.format(url=url, token=token_id) emailutils.send(to=[email], subject="Password reset for Decapod", text_body=message)
def notify_about_new_password(model, password): """Sends email to user with his new password.""" message = make_password_message(model, password) emailutils.send( to=[model.email], subject="New password for Decapod", text_body=message )
def notify_user(token_id, email): url = CONF["api"]["reset_password_url"].format(reset_token=token_id) message = PASSWORD_MESSAGE.format(url=url, token=token_id) emailutils.send( to=[email], subject="Password reset for Decapod", text_body=message )
def alert(request_id, error, sys_exc_info): """Plugin entry point.""" LOG.info("Email alerting on %s", error) if sys_exc_info[-1] is None: message = alert_managed_error(request_id, error) subject = "Internal server error" else: message = alert_unmanaged_error(request_id, error, sys_exc_info) subject = "Unmanaged internal server error" emailutils.send(CONF.PLUGINS_ALERTS["email"]["send_to"], subject, message, from_=CONF.PLUGINS_ALERTS["email"]["from"])