fixing whitelabel from name. Identified possible bug when reconfirming forms
This commit is contained in:
parent
9eb1580afa
commit
57cee01051
|
@ -315,6 +315,8 @@ def resend_confirmation(email):
|
|||
# ~~~
|
||||
# if there's no bounce, we proceed to resend the confirmation.
|
||||
|
||||
# BUG: What if this is an owned form with hashid??
|
||||
|
||||
form = Form.query.filter_by(hash=HASH(email, request.form['host'])).first()
|
||||
if not form:
|
||||
if request_wants_json():
|
||||
|
|
|
@ -138,13 +138,13 @@ def send_email(to=None, subject=None, text=None, html=None,
|
|||
bracket = sender.index('<')
|
||||
data.update({
|
||||
'from': sender[bracket+1:-1],
|
||||
'from_name': sender[:bracket].strip()
|
||||
'fromname': sender[:bracket].strip()
|
||||
})
|
||||
except ValueError:
|
||||
data.update({'from': sender})
|
||||
|
||||
if from_name:
|
||||
data.update({'from_name': from_name})
|
||||
data.update({'fromname': from_name})
|
||||
|
||||
if headers:
|
||||
data.update({'headers': json.dumps(headers)})
|
||||
|
|
Loading…
Reference in New Issue