Skip to content

⚙️ 一个GitHub动作可以向多个收件人发送电子邮件 | A GitHub Action to send an email to multiple recipients

License

Notifications You must be signed in to change notification settings

betterfor/action-send-mail

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

English | 简体中文

Send Mail Github Action

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

Usage

- 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

Troubleshooting

Unauthenticated login (username/password field)

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.

About

⚙️ 一个GitHub动作可以向多个收件人发送电子邮件 | A GitHub Action to send an email to multiple recipients

Resources

License

Stars

Watchers

Forks

Packages

No packages published