Skip to content

Commit 6bb2761

Browse files
committed
Stop escaping HTML content
1 parent 458dbe8 commit 6bb2761

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

.github/workflows/phep3_email_reminder.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,9 @@ jobs:
2929
cd _pages/docs/phep-3
3030
python generate_email.py
3131
32-
- name: Read Email Content
32+
- name: Read Subject
3333
id: email
34-
run: |
35-
echo "subject=$(cat _pages/docs/phep-3/email_subject.txt)" >> $GITHUB_OUTPUT
36-
# For multiline body, use delimiter
37-
echo "body<<EOF" >> $GITHUB_OUTPUT
38-
cat _pages/docs/phep-3/email_body.txt >> $GITHUB_OUTPUT
39-
echo "EOF" >> $GITHUB_OUTPUT
34+
run: echo "subject=$(cat _pages/docs/phep-3/email_subject.txt)" >> $GITHUB_OUTPUT
4035

4136
- name: Send Email
4237
uses: dawidd6/action-send-mail@v3
@@ -46,7 +41,6 @@ jobs:
4641
username: ${{ secrets.PYHC_EMAIL_ADDRESS }}
4742
password: ${{ secrets.PYHC_EMAIL_APP_PASSWORD }}
4843
subject: ${{ steps.email.outputs.subject }}
49-
body: ${{ steps.email.outputs.body }}
44+
html_body: file://_pages/docs/phep-3/email_body.html
5045
to: ${{ inputs.test_recipient || '[email protected]' }}
5146
from: PyHC <${{ secrets.PYHC_EMAIL_ADDRESS }}>
52-
content_type: text/html

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Gemfile.lock
1010

1111
# PHEP 3 email reminder temp files
1212
_pages/docs/phep-3/email_subject.txt
13-
_pages/docs/phep-3/email_body.txt
13+
_pages/docs/phep-3/email_body.html

_pages/docs/phep-3/generate_email.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ def main():
144144
else:
145145
print("No future quarters found in schedule. Using empty content.")
146146
subject = f"PHEP 3 Reminder: Q{quarter} {year} Support Schedule"
147-
body = "No schedule data available for this quarter. Please check the PHEP 3 support schedule page."
147+
body = "<html><body><p>No schedule data available for this quarter.</p></body></html>"
148148
Path(script_dir / "email_subject.txt").write_text(subject)
149-
Path(script_dir / "email_body.txt").write_text(body)
149+
Path(script_dir / "email_body.html").write_text(body)
150150
return
151151

152152
quarter_content = quarters[(year, quarter)]
@@ -158,10 +158,10 @@ def main():
158158

159159
# Write outputs for the GitHub Action to use
160160
Path(script_dir / "email_subject.txt").write_text(subject)
161-
Path(script_dir / "email_body.txt").write_text(body)
161+
Path(script_dir / "email_body.html").write_text(body)
162162

163163
print(f"\nSubject: {subject}")
164-
print(f"\nBody preview:\n{body[:500]}...")
164+
print(f"\nHTML body written to email_body.html")
165165

166166

167167
if __name__ == "__main__":

0 commit comments

Comments
 (0)