This commit is contained in:
parent
fe1b21fe06
commit
397afb2e8b
|
|
@ -49,7 +49,7 @@ def preview_email(to_addrs, subject, html_file, language,
|
|||
return _error("模板缺少 {{recipient_name}} 占位符")
|
||||
|
||||
# 生成预览,用用户填写的 default_name(留空时仍展示 there)
|
||||
preview = (tpl.replace("{{recipient_name}}", default_name or "there")
|
||||
preview = (tpl.replace("{{recipient_name}}", default_name or ("老板" if language == "chinese" else "there"))
|
||||
.replace("{{recipient_email}}", "example@example.com")
|
||||
.replace("{{encoded_recipient_email}}", "ENCODED_EXAMPLE")
|
||||
.replace("{{timestamp}}", datetime.now().isoformat()))
|
||||
|
|
|
|||
Loading…
Reference in New Issue