Skip to content

Commit df54820

Browse files
Merge pull request #1 from KyloRen1/main
Fix for email
2 parents d7ed86d + f011adf commit df54820

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ inputs:
3232
email-target:
3333
description: 'An email to report successes and failures to.'
3434
required: true
35+
email-starttls:
36+
description: 'Explicitly starttls to connect to SMTP server'
37+
default: false
3538
branding:
3639
icon: 'wind'
3740
color: 'yellow'
@@ -171,6 +174,8 @@ runs:
171174
msg['To'] = to
172175
msg['Subject'] = 'Deploy success | ${{ github.repository }} ${{ steps.get-versions.outputs.tag }}'
173176
with SMTP('${{ inputs.email-server }}') as s:
177+
if ${{ inputs.email-starttls }} == 'true':
178+
s.starttls()
174179
s.login('${{ inputs.email-user }}', '${{ inputs.email-token }}')
175180
s.sendmail(from_, [to], msg.as_string())
176181
"
@@ -189,6 +194,8 @@ runs:
189194
msg['To'] = to
190195
msg['Subject'] = 'Deploy ERROR | ${{ github.repository }} ${{ steps.get-versions.outputs.tag }}'
191196
with SMTP('${{ inputs.email-server }}') as s:
197+
if ${{ inputs.email-starttls }} == 'true':
198+
s.starttls()
192199
s.login('${{ inputs.email-user }}', '${{ inputs.email-token }}')
193200
s.sendmail(from_, [to], msg.as_string())
194201
"

0 commit comments

Comments
 (0)