-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (32 loc) · 1.25 KB
/
send-email.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Email Workflow
on:
workflow_dispatch:
inputs:
emailSubject:
description: Email Subject
default: ryanwang's weekly 第 1 期
required: true
htmlBody:
description: Html Body
default: https://weekly.bigdreamer.cc
required: true
jobs:
bot:
runs-on: ubuntu-latest
steps:
- run: curl -o email.html ${{ github.event.inputs.htmlBody }}
- run: echo file:///email.html
- run: ls
- name: 'Send mail'
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.163.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: ${{ github.event.inputs.emailSubject }}
content_type: text/html
html_body: | # file://email.html
<div><p style="font-size: 15px;margin-bottom: 18px;">Hi, ryanwang's weekly Updated! Please click <a href="${{ github.event.inputs.htmlBody }}">link</a> to visit~</p><img src="https://to-out-use.oss-cn-hangzhou.aliyuncs.com/common/duCTmB.jpg?x-oss-process=image/auto-orient,1/interlace,1/quality,q_90/format,webp"></div>
from: ryanwang's weekly