File tree Expand file tree Collapse file tree 3 files changed +8
-14
lines changed
Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 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
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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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"\n Subject: { subject } " )
164- print (f"\n Body preview: \n { body [: 500 ] } ... " )
164+ print (f"\n HTML body written to email_body.html " )
165165
166166
167167if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments