if set MAIL_DEFAULT_SENDER not set SECURITY_EMAIL_SENDER, email can't be sent.
In utils.py send_mail function:
msg = Message(subject,
sender=_security.email_sender,
recipients=[recipient])`,
sender is a LocalProxy instance. So, mail.send(msg) will happen ValueError: too many values to unpack. Because in flask-mail sanitize_address function:
def sanitize_address(addr, encoding='utf-8'):
if isinstance(addr, string_types):
addr = parseaddr(force_text(addr))
nm, addr = addr
addr is a LocalProxy instance. isinstance(addr, string_types) is False. So, nm, addr = addr goes wrong, ValueError: too many values to unpack.
I'm in the same place you were when you wrote this. Any ideas on a fix?
A quick and short fix is ready to merge in this pull request:
https://github.com/mattupstate/flask-security/pull/695
Having the same problem. Would be nice to get this merged.
Any roadmap for when master with fix to this problem will be release on pip?
Currently I have to manually install flask security with pip install git+https://github.com/mattupstate/flask-security, which doesn't get traced in Conda's environment definition.
Most helpful comment
Any roadmap for when master with fix to this problem will be release on pip?
Currently I have to manually install flask security with
pip install git+https://github.com/mattupstate/flask-security, which doesn't get traced in Conda's environment definition.