Skip to content

Commit e34a045

Browse files
authored
Merge pull request #29 from ONS-Innovation/patch_contact_button
KEH-508 | Add Template Subject and Body to Mailto
2 parents 11ec478 + fa268ae commit e34a045

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

src/app.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,11 +391,30 @@ def load_file(filename: str) -> dict:
391391

392392
st.write("Please contact them to resolve the issues.")
393393

394-
mail_link = f"mailto:{','.join(points_of_contact)}"
394+
mail_link = (
395+
f"mailto:{','.join(points_of_contact)}"
396+
f"?subject={selected_repo['Repository']}%20-%20GitHub%20Usage%20Policy%20Recommendations"
397+
f"&body=Hello%2C%0A%0AWe%20have%20identified%20some%20issues%20with%20your%20repository%20-%20{selected_repo['Repository']}%20-%20which%20breach%20parts%20of%20the%20GitHub%20Usage%20Policy.%0A"
398+
"Please%20review%20the%20following%20rules%20and%20take%20the%20necessary%20actions%20to%20resolve%20them.%0A%0A"
399+
f"-%20{',%0A-%20'.join(failed_checks.index).replace('_', '%20').title()}%0A%0A"
400+
"If%20you%20have%20any%20questions%20or%20need%20further%20assistance%2C%20please%20reply%20to%20this%20email.%0A"
401+
)
395402

396403
st.html(
397404
f'<a href="{mail_link}"><button>Email Points of Contact</button></a>'
398405
)
406+
407+
st.caption("Please Note: The email addresses are separated with a comma following the RFC 6068 standard. To use this link in Microsoft Outlook, you may need to replace the commas with semicolons or enable commas to be used as the recipient seperator.")
408+
409+
with st.expander("Instructions for Microsoft Outlook Comma Seperator"):
410+
st.write("To enable this feature in Microsoft Outlook, follow these steps:")
411+
st.write("1. Navigate to File > Options > Mail.")
412+
st.write("2. Under the Send messages section, there is a checkbox for 'Commas can be used to separate multiple message recipients'.")
413+
st.write("3. Check this box and click OK.")
414+
st.write("Now you can use the mailto link in Microsoft Outlook.")
415+
416+
st.write("For more information, please refer to [this](https://www.lifewire.com/commas-to-separate-email-recipients-1173680) article.")
417+
399418
else:
400419
st.write("No point of contact available.")
401420
else:

0 commit comments

Comments
 (0)