prototype / src /mailing_utils.py
fvde's picture
Upload folder using huggingface_hub
7221fd1
raw
history blame contribute delete
458 Bytes
import urllib.parse
def construct_url(address: str, subject: str, body: str):
return f"mailto:{address}?subject={subject}&body={body}"
def update_email_content(email_wrapping_content: str, summary: str) -> str:
if "<TEXT_FROM_LLM>" in email_wrapping_content:
email_content = email_wrapping_content.replace("<TEXT_FROM_LLM>", summary)
else:
email_content = email_wrapping_content + "\n\n" + summary
return email_content