English | 简体中文
Reference action-send-mail
An action that simply sends a mail to multiple recipients.
Some feature:
- Plain text body
- HTML body
- Multipart body (plain text + HTML)
- Markdown to HTML
- File attachments
- name: Send mail
uses: betterfor/action-sned-mail@main
with:
# Reqired mail server address
server_address: smtp.qq.com
# Optional Server port, default 25 (if server_port is 465 this connection use TLS)
server_port: 465
# Optional (recommended): mail server username
username: ${{secrets.MAIL_USERNAME}}
# Optional (recommended): mail server password
password: ${{secrets.MAIL_PASSWORD}}
# Required mail subject
subject: Github Actions job results
# Required recipients address
to: [email protected], [email protected]
# Required sender full name (address can be skipped)
from: alice # <[email protected]>
# Optional plain body
body: Build job of ${{github.repository}} completed successfully!
# Optional HTML body read from file
html_body: file:https://README.md
# Optional carbon copy recipients
cc: [email protected],[email protected]
# Optional blind carbon copy recipients
bcc: [email protected],[email protected]
# Optional recipient of the email response
reply_to: [email protected]
# Optional Message ID this message is replying to
in_reply_to: <[email protected]>
# Optional converting Markdown to HTML (set content_type to text/html too)
convert_mardown: true
# Optional attachments
attachments: README.md
# Optional priority: 'high', 'normal' (default) or 'low'
priority: low
The parameters username
and password
are set as optional to support self-hosted runners access to on-premise infrastructrue. If you are accessing public email servers make sure you provide a username/password authentication through Github Secrets to make the email delivery secure.